68 lines
2.0 KiB
Dart
Executable File
68 lines
2.0 KiB
Dart
Executable File
import 'package:flutter/material.dart';
|
||
import 'package:flutter_app/view/components/WebViewWidget.dart';
|
||
|
||
class Config {
|
||
|
||
// default 默认布局,twoColumn 两栏布局
|
||
static String indexLayout = "default";
|
||
|
||
// 未激活时候底部tabbar 样式
|
||
static const List<Icon> tabImages = [
|
||
Icon(Icons.home, size: 25.0, color: Colors.grey,),
|
||
Icon(Icons.view_quilt, size: 25.0, color: Colors.grey,),
|
||
Icon(Icons.favorite_border, size: 25.0, color: Colors.grey,),
|
||
Icon(Icons.person_outline, size: 25.0, color: Colors.grey,),
|
||
];
|
||
|
||
// 激活时候底部tabbar 样式
|
||
static const List<Icon> tabSelectedImages = [
|
||
Icon(Icons.home, size: 25.0, color: Colors.orange,),
|
||
Icon(Icons.view_module, size: 25.0, color: Colors.orange,),
|
||
Icon(Icons.favorite, size: 25.0, color: Colors.orange,),
|
||
Icon(Icons.pperson, size: 25.0, color: Colors.orange,),
|
||
];
|
||
|
||
// 默认 白天模式
|
||
static bool dark = false;
|
||
// 默认返回 白天模式
|
||
static ThemeData themeData = getThemeData(dark);
|
||
static ThemeData themeDataDark = new ThemeData.dark();
|
||
|
||
// 返回白天还是黑夜模式
|
||
static getThemeData(bool dark){
|
||
if(dark){
|
||
return themeDataDark;
|
||
}else{
|
||
return themeDataLight;
|
||
}
|
||
}
|
||
|
||
// 默认白天模式的配置
|
||
static ThemeData themeDataLight = new ThemeData(
|
||
primarySwatch: Colors.orange,
|
||
primaryColor: Colors.orange,
|
||
accentColor: Colors.white,
|
||
primaryColorBrightness: Brightness.light,
|
||
);
|
||
|
||
// 启动页面配置
|
||
static const Map Welcome = {
|
||
"title": "夜色社区",
|
||
"img": "lib/static/img/logo.png",
|
||
"waitTime": 4,
|
||
"loadingText": "Waiting"
|
||
};
|
||
|
||
// 路由配置
|
||
static final Map<String, WidgetBuilder> routers = {
|
||
"/about": (_) => new WebViewWidget('https://github.com/helpcode', 'GitHub'),
|
||
};
|
||
|
||
static final publivKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCzkEs/kJgaFGIAM/TQRjzUtJ9v"+
|
||
"e9enk6heGj/JbcvHVOwFYw2qCNUhuaFE9rYDL+CzX3+cf7inRIJCvSnC0bdGCZ+i"+
|
||
"943uSudTkqT+guv03jTzvLy2TD+Bp41/ToNiPWG56p1keHE0Gwsr7o0waIcWrLpF"+
|
||
"JnzyW/fOYQjboRz7nwIDAQAB";
|
||
|
||
|
||
|
||
} |