OpenMediacenterMobileFlutter/lib/preview/actor_tile.dart
lukas-heiligenbrunner 5fc77b4abb linux build
cache previews in sqlite db
actor page
outsouce different players in seperate classes
2022-08-28 22:51:12 +02:00

74 lines
2.1 KiB
Dart

import 'package:flutter/material.dart';
import 'package:openmediacentermobile/preview/actor_feed.dart';
import '../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),
),
),
);
},
),
),
),
),
],
),
);
}
}