flutter_yfree 2.3.1 copy "flutter_yfree: ^2.3.1" to clipboard
flutter_yfree: ^2.3.1 copied to clipboard

YFree_Flutter

example/lib/main.dart

/*
                        佛曰:
                             写字楼里写字间,写字间里程序员;
                             程序人员写程序,又拿程序换酒钱。
                             酒醒只在网上坐,酒醉还来网下眠;
                             酒醉酒醒日复日,网上网下年复年。
                             但愿老死电脑间,不愿鞠躬老板前;
                             奔驰宝马贵者趣,公交自行程序员。
                             别人笑我忒疯癫,我笑自己命太贱;
                             不见满街漂亮妹,哪个归得程序员?
          <佛祖保佑>                                              <永无BUG>
                                       _ooOoo_
                                      o8888888o
                                      88" . "88
                                      (| -_- |)
                                      O\  =  /O
                                   ____/`---'\____
                                 .'  \\|     |//  `.
                                /  \\|||  :  |||//  \
                               /  _||||| -:- |||||-  \
                               |   | \\\  -  /// |   |
                               | \_|  ''\---/''  |   |
                               \  .-\__  `-`  ___/-. /
                             ___`. .'  /--.--\  `. . __
                          ."" '<  `.___\_<|>_/___.'  >'"".
                         | | :  `- \`.;`\ _ /`;.`/ - ` : | |
                         \  \ `-.   \_ __\ /__ _/   .-` /  /
                    ======`-.____`-.___\_____/___.-`____.-'======
                                       `=---='
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
           <佛祖镇楼>                                              <BUG辟易>
*/
import 'package:flutter/material.dart';
import 'package:flutter_yfree/YFree.dart';
import 'package:flutter_yfree_example/Localizations.dart';
import 'package:flutter_yfree_example/MyPage.dart';

void main() {
  yRunApp(
    launchPage: MyPage(),
    primarySwatch: Colors.blue,
    onYConfig: () {
      YConfig.appName = "YFree_App";
      YConfig.themeColor = const Color.fromARGB(255, 58, 140, 255);
      YConfig.statubar = "images/statubar.png";
      YConfig.navBar = "images/statubar.png";
      YConfig.onHttpHeader = () async {
        return {
          "myHeader": "YFree",
        };
      };
      YConfig.onHttpParam = YConfig.onHttpHeader;
      YConfig.localizations = localizations;
      YConfig.onLocaleLoad = (locale) async {
        yToast("当前语言:${locale.languageCode}");
      };
    },
  );
}