forked from toly1994328/FlutterUnit
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
dcbadce
commit 13d5842
Showing
4 changed files
with
49 additions
and
8 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
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
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,41 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:app/app.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
import '../../views/setting/code_style_setting.dart'; | ||
import '../../views/setting/font_setting.dart'; | ||
import '../../views/setting/setting_page.dart'; | ||
import '../../views/setting/theme_color_setting.dart'; | ||
import '../unit_navigation.dart'; | ||
|
||
class RoutePath { | ||
|
||
static const String nav = 'nav'; | ||
|
||
static const String themeColorSetting = 'ThemeColorSettingPage'; | ||
static const String codeStyleSetting = 'CodeStyleSettingPage'; | ||
static const String itemStyleSetting = 'ItemStyleSettingPage'; | ||
static const String fontSetting = 'FountSettingPage'; | ||
|
||
Map<String, WidgetBuilder> get routes => | ||
{ | ||
themeColorSetting: (ctx) => const ThemeColorSettingPage(), | ||
codeStyleSetting: (ctx) => const CodeStyleSettingPage(), | ||
fontSetting: (ctx) => const FontSettingPage(), | ||
}; | ||
|
||
|
||
static Route<dynamic>? generateRoute(RouteSettings settings) { | ||
switch (settings.name) { | ||
case nav: | ||
if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) { | ||
return ZeroPageRoute(child: UnitNavigation()); | ||
} | ||
return SlidePageRoute(child: UnitNavigation()); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
} |
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