2021-04-10 02:35:30 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2021-04-11 02:52:37 +00:00
|
|
|
import 'package:loc_chain_app/util/bluetooth.dart';
|
2021-04-10 18:45:44 +00:00
|
|
|
import 'package:shared_preferences/shared_preferences.dart';
|
2021-04-10 15:26:20 +00:00
|
|
|
import 'package:loc_chain_app/widgets/navbar.dart';
|
2021-04-11 02:52:37 +00:00
|
|
|
import 'package:flutter_udid/flutter_udid.dart';
|
2021-04-10 02:35:30 +00:00
|
|
|
|
2021-04-10 18:45:44 +00:00
|
|
|
void main() async {
|
2021-04-11 05:59:30 +00:00
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
2021-04-10 19:06:54 +00:00
|
|
|
runApp(App());
|
2021-04-11 02:52:37 +00:00
|
|
|
(await SharedPreferences.getInstance())
|
|
|
|
.setString('userName', await FlutterUdid.consistentUdid);
|
2021-04-10 02:35:30 +00:00
|
|
|
}
|
|
|
|
|
2021-04-10 15:26:20 +00:00
|
|
|
class App extends StatelessWidget {
|
2021-04-10 02:35:30 +00:00
|
|
|
// This widget is the root of your application.
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2021-04-11 02:52:37 +00:00
|
|
|
Connect.start();
|
|
|
|
|
2021-04-10 02:35:30 +00:00
|
|
|
return MaterialApp(
|
2021-04-11 05:59:30 +00:00
|
|
|
title: 'Loc-Chain',
|
2021-04-10 02:35:30 +00:00
|
|
|
theme: ThemeData(
|
2021-04-10 15:26:20 +00:00
|
|
|
primarySwatch: Colors.lightBlue,
|
2021-04-10 02:35:30 +00:00
|
|
|
),
|
2021-04-10 15:26:20 +00:00
|
|
|
home: NavBarWidget(),
|
2021-04-10 02:35:30 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|