-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
99 additions
and
450 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// part of "pages.g.dart"; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_web/routes.g.dart'; | ||
import 'package:you_flutter/better_ui.dart'; | ||
import 'package:you_flutter/router.dart'; | ||
import 'package:you_note_dart/note.dart'; | ||
import 'package:shared_preferences/shared_preferences.dart'; | ||
|
||
final YouRouter router = YouRouter( | ||
root: root, | ||
initial: routes.notes_widgets_specific_widgets_button_overview.toUri(), | ||
navigatorKey: GlobalKey<NavigatorState>(debugLabel: "mainNavigator"), | ||
); | ||
|
||
class App extends StatelessWidget { | ||
final NoteSystem noteSystem; | ||
final SharedPreferences sharedPreferences; | ||
|
||
// ignore: prefer_const_constructors_in_immutables | ||
App({super.key, required this.noteSystem, required this.sharedPreferences}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return MaterialApp.router( | ||
title: "flutter note", | ||
theme: ThemeData(colorScheme: ColorScheme.fromSeed(seedColor: Colors.tealAccent.shade700, brightness: Brightness.light), useMaterial3: true), | ||
darkTheme: ThemeData(colorScheme: ColorScheme.fromSeed(seedColor: ColorSeed.m3baseline.color, brightness: Brightness.dark), useMaterial3: true), | ||
routerConfig: router.toRouterConfig(), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,12 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_web/pages.g.dart'; | ||
import 'package:you_flutter/better_ui.dart'; | ||
import 'package:you_note_dart/note.dart'; | ||
import 'package:flutter_web/note_app.dart'; | ||
import 'package:shared_preferences/shared_preferences.dart'; | ||
import 'package:flutter_web/app.dart'; | ||
import 'package:you_note_dart/note.dart'; | ||
|
||
void main() async { | ||
WidgetsFlutterBinding.ensureInitialized(); | ||
NoteSystem noteSystem = await NoteSystem.load( | ||
root: BaseNotes.rootroot, | ||
); | ||
SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); | ||
runApp(_AppRootWidget(title: "ssss",)); | ||
} | ||
|
||
class _AppRootWidget extends StatefulWidget { | ||
|
||
const _AppRootWidget({required this.title}); | ||
|
||
final String title; | ||
|
||
@override | ||
State<_AppRootWidget> createState() => _AppRootWidgetState(); | ||
|
||
} | ||
|
||
class _AppRootWidgetState extends State<_AppRootWidget> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return MaterialApp.router( | ||
title: widget.title, | ||
theme: ThemeData( | ||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.tealAccent.shade700, brightness: Brightness.light), | ||
useMaterial3: true), | ||
darkTheme: ThemeData( | ||
colorScheme: ColorScheme.fromSeed(seedColor: ColorSeed.m3baseline.color, brightness: Brightness.dark), | ||
useMaterial3: true), | ||
routerConfig: router.toRouterConfig(), | ||
); | ||
} | ||
runApp(App( | ||
sharedPreferences: await SharedPreferences.getInstance(), | ||
noteSystem: NoteSystem(root: router.root), | ||
)); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.