+ hive
+ LibraryPage + StoryPage + logo + font
This commit is contained in:
33
FRONT/lib/main.dart
Normal file
33
FRONT/lib/main.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:story/screens/homePage.dart';
|
||||
import 'package:story/screens/storyPage.dart';
|
||||
|
||||
void main() async {
|
||||
|
||||
//init hive
|
||||
await Hive.initFlutter() ;
|
||||
|
||||
//open box
|
||||
var box = Hive.openBox('storyBox');
|
||||
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({ super.key}) ;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'Mon Application',
|
||||
theme: ThemeData(
|
||||
primarySwatch: Colors.blue,
|
||||
),
|
||||
home: Material(child: const HomePage()),
|
||||
routes: {
|
||||
'storyPage': (context) => StoryPage(),
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user