12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- import 'dart:io';
- import 'package:douyin_demo/pages/recommend_page.dart';
- import 'package:douyin_demo/routes.dart';
- import 'package:flutter/material.dart';
- import 'package:shared_preferences/shared_preferences.dart';
- void main() async {
- WidgetsFlutterBinding.ensureInitialized();
- final prefs = await SharedPreferences.getInstance();
- prefs.setBool("ifIOS", Platform.isIOS);
- prefs.setBool("ifPrd", false);
- prefs.setBool("ifReal_d", false);
- prefs.setString("urlPath_real_d", "192.168.0.8");
- prefs.setString("scheme_real_d", "http");
- prefs.setInt("ports_real_d", 5000);
- prefs.setString("urlPath_ios_d", "127.0.0.1");
- prefs.setString("scheme_ios_d", "http");
- prefs.setInt("ports_ios_d", 5000);
- prefs.setString("urlPath_and_d", "10.0.2.2");
- prefs.setString("scheme_and_d", "http");
- prefs.setInt("ports_and_d", 5000);
- prefs.setString("urlPath_p", "118.26.177.76");
- prefs.setString("scheme_p", "http");
- prefs.setInt("ports_p", 80);
- // prefs.setString("picServer", "http://www.guojio.com");
- runApp(MyApp());
- }
- class MyApp extends StatelessWidget {
- const MyApp({Key? key}) : super(key: key);
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- title: "抖音",
- debugShowCheckedModeBanner: false,
- theme: ThemeData(primaryColor: Color(0xff121319)),
- home: RecommendPage(
- selIndex: 0,
- ),
- routes: Routes.define(),
- // initialRoute: Routes.splash,
- );
- }
- }
|