forked from yaso_meth/mih-project
create test tile for prototypes
This commit is contained in:
82
Frontend/patient_manager/lib/mih_packages/test/test.dart
Normal file
82
Frontend/patient_manager/lib/mih_packages/test/test.dart
Normal file
@@ -0,0 +1,82 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:patient_manager/mih_components/mih_layout/mih_action.dart';
|
||||
import 'package:patient_manager/mih_components/mih_layout/mih_body.dart';
|
||||
import 'package:patient_manager/mih_components/mih_layout/mih_header.dart';
|
||||
import 'package:patient_manager/mih_components/mih_layout/mih_layout_builder.dart';
|
||||
import 'package:patient_manager/mih_components/mih_layout/mih_window.dart';
|
||||
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
|
||||
|
||||
class MIHTest extends StatefulWidget {
|
||||
const MIHTest({super.key});
|
||||
|
||||
@override
|
||||
State<MIHTest> createState() => _MIHTestState();
|
||||
}
|
||||
|
||||
class _MIHTestState extends State<MIHTest> {
|
||||
late YoutubePlayerController videoController;
|
||||
String videoLink = "https://www.youtube.com/watch?v=P2bM9eosJ_A";
|
||||
@override
|
||||
void initState() {
|
||||
videoController = YoutubePlayerController(
|
||||
initialVideoId: "P2bM9eosJ_A",
|
||||
);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MIHLayoutBuilder(
|
||||
actionButton: MIHAction(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
iconSize: 35,
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamedAndRemoveUntil(
|
||||
'/',
|
||||
arguments: true,
|
||||
(route) => false,
|
||||
);
|
||||
},
|
||||
),
|
||||
header: const MIHHeader(
|
||||
headerAlignment: MainAxisAlignment.center,
|
||||
headerItems: [
|
||||
Text(
|
||||
"Test",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 25,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
secondaryActionButton: null,
|
||||
body: MIHBody(
|
||||
borderOn: false,
|
||||
bodyItems: [
|
||||
YoutubePlayer(
|
||||
controller: videoController,
|
||||
),
|
||||
],
|
||||
),
|
||||
actionDrawer: null,
|
||||
secondaryActionDrawer: null,
|
||||
bottomNavBar: null,
|
||||
pullDownToRefresh: false,
|
||||
onPullDown: () async {},
|
||||
);
|
||||
// return MIHWindow(
|
||||
// fullscreen: false,
|
||||
// windowTitle: "Test",
|
||||
// windowTools: const [],
|
||||
// onWindowTapClose: () {
|
||||
// Navigator.pop(context);
|
||||
// },
|
||||
// windowBody: [
|
||||
// YoutubePlayer(
|
||||
// controller: videoController,
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user