| 
									
										
										
										
											2022-08-28 18:48:53 +02:00
										 |  |  | import 'package:flutter/material.dart'; | 
					
						
							| 
									
										
										
										
											2022-08-28 22:51:12 +02:00
										 |  |  | import 'package:openmediacentermobile/preview/actor_feed.dart'; | 
					
						
							| 
									
										
										
										
											2022-08-28 18:48:53 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-30 23:37:24 +02:00
										 |  |  | import '../utils/platform.dart'; | 
					
						
							| 
									
										
										
										
											2022-08-28 18:48:53 +02:00
										 |  |  | 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, | 
					
						
							|  |  |  |                 ), | 
					
						
							| 
									
										
										
										
											2022-08-28 22:51:12 +02:00
										 |  |  |                 // todo implement case where we have really an picture
 | 
					
						
							| 
									
										
										
										
											2022-08-28 18:48:53 +02:00
										 |  |  |                 SizedBox( | 
					
						
							|  |  |  |                   height: 100, | 
					
						
							|  |  |  |                   width: 100, | 
					
						
							| 
									
										
										
										
											2022-08-28 22:51:12 +02:00
										 |  |  |                   child: Center( | 
					
						
							|  |  |  |                     child: Icon( | 
					
						
							|  |  |  |                       Icons.person_outline, | 
					
						
							|  |  |  |                       size: 56, | 
					
						
							|  |  |  |                     ), | 
					
						
							|  |  |  |                   ), | 
					
						
							| 
									
										
										
										
											2022-08-28 18:48:53 +02:00
										 |  |  |                 ) | 
					
						
							|  |  |  |               ], | 
					
						
							|  |  |  |             ), | 
					
						
							|  |  |  |             color: Color(0x6a94a6ff), | 
					
						
							|  |  |  |           ), | 
					
						
							|  |  |  |           Positioned.fill( | 
					
						
							|  |  |  |             child: Material( | 
					
						
							|  |  |  |               color: Colors.transparent, | 
					
						
							|  |  |  |               child: GestureDetector( | 
					
						
							|  |  |  |                 behavior: HitTestBehavior.translucent, | 
					
						
							|  |  |  |                 onLongPress: () {}, | 
					
						
							|  |  |  |                 onLongPressEnd: (details) {}, | 
					
						
							|  |  |  |                 child: InkWell( | 
					
						
							|  |  |  |                   onTap: () { | 
					
						
							| 
									
										
										
										
											2022-08-28 22:51:12 +02:00
										 |  |  |                     Navigator.push( | 
					
						
							|  |  |  |                       context, | 
					
						
							|  |  |  |                       MaterialPageRoute( | 
					
						
							|  |  |  |                         builder: (context) => Scaffold( | 
					
						
							|  |  |  |                           appBar: AppBar(title: Text(widget.actor.name)), | 
					
						
							|  |  |  |                           body: ActorFeed(actor: widget.actor), | 
					
						
							|  |  |  |                         ), | 
					
						
							|  |  |  |                       ), | 
					
						
							|  |  |  |                     ); | 
					
						
							| 
									
										
										
										
											2022-08-28 18:48:53 +02:00
										 |  |  |                   }, | 
					
						
							|  |  |  |                 ), | 
					
						
							|  |  |  |               ), | 
					
						
							|  |  |  |             ), | 
					
						
							|  |  |  |           ), | 
					
						
							|  |  |  |         ], | 
					
						
							|  |  |  |       ), | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } |