74 lines
2.1 KiB
Dart
74 lines
2.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:openmediacentermobile/preview/actor_feed.dart';
|
|
|
|
import '../utils/platform.dart';
|
|
import '../types/actor.dart';
|
|
|
|
class ActorTile extends StatefulWidget {
|
|
const ActorTile({Key? key, required this.actor}) : super(key: key);
|
|
final Actor actor;
|
|
|
|
@override
|
|
State<ActorTile> createState() => _ActorTileState();
|
|
}
|
|
|
|
class _ActorTileState extends State<ActorTile> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ClipRRect(
|
|
borderRadius: BorderRadius.circular(20.0),
|
|
child: Stack(
|
|
children: [
|
|
Container(
|
|
child: Column(
|
|
children: [
|
|
Text(
|
|
widget.actor.name,
|
|
style: TextStyle(fontSize: isTV() ? 8 : 10.5),
|
|
overflow: TextOverflow.clip,
|
|
maxLines: 1,
|
|
),
|
|
// todo implement case where we have really an picture
|
|
SizedBox(
|
|
height: 100,
|
|
width: 100,
|
|
child: Center(
|
|
child: Icon(
|
|
Icons.person_outline,
|
|
size: 56,
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
color: Color(0x6a94a6ff),
|
|
),
|
|
Positioned.fill(
|
|
child: Material(
|
|
color: Colors.transparent,
|
|
child: GestureDetector(
|
|
behavior: HitTestBehavior.translucent,
|
|
onLongPress: () {},
|
|
onLongPressEnd: (details) {},
|
|
child: InkWell(
|
|
onTap: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => Scaffold(
|
|
appBar: AppBar(title: Text(widget.actor.name)),
|
|
body: ActorFeed(actor: widget.actor),
|
|
),
|
|
),
|
|
);
|
|
},
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|