You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.2 KiB
Dart
81 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:queuing_system/utils/signalR_utils.dart';
|
|
|
|
import 'core/base/app_scaffold_widget.dart';
|
|
import 'core/base/project_view_model.dart';
|
|
import 'core/config/size_config.dart';
|
|
|
|
void main() {
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({Key key}) : super(key: key);
|
|
|
|
// This widget is the root of your application.
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return LayoutBuilder(
|
|
builder: (context, constraints) {
|
|
return OrientationBuilder(builder: (context, orientation) {
|
|
SizeConfig().init(constraints, orientation);
|
|
return MultiProvider(
|
|
providers: [
|
|
|
|
ChangeNotifierProvider<ProjectViewModel>(
|
|
create: (context) => ProjectViewModel(),
|
|
),
|
|
],
|
|
child: Consumer<ProjectViewModel>(
|
|
builder: (context, projectProvider, child) => MaterialApp(
|
|
showSemanticsDebugger: false,
|
|
title: 'Doctors App',
|
|
theme: ThemeData(
|
|
primarySwatch: Colors.grey,
|
|
primaryColor: Colors.grey,
|
|
fontFamily: 'Poppins',
|
|
dividerColor: Colors.grey[350],
|
|
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
|
|
),
|
|
home:MyHomePage() ,
|
|
debugShowCheckedModeBanner: false,
|
|
)),
|
|
);
|
|
});
|
|
},
|
|
);
|
|
}
|
|
}
|
|
|
|
class MyHomePage extends StatefulWidget {
|
|
|
|
|
|
String title ="MyHomePage";
|
|
|
|
@override
|
|
State<MyHomePage> createState() => _MyHomePageState();
|
|
}
|
|
|
|
class _MyHomePageState extends State<MyHomePage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
SignalRHelper signalRHelper= SignalRHelper();
|
|
return AppScaffold(
|
|
appBar: AppBar(
|
|
title: Text(widget.title),
|
|
),
|
|
body: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: <Widget>[
|
|
Text(
|
|
signalRHelper.msg,
|
|
),
|
|
],
|
|
),
|
|
), // This trailing comma makes auto-formatting nicer for build methods.
|
|
);
|
|
}
|
|
}
|