update screenutil dep

hmxc
小赖 4 years ago
parent bbe84bc394
commit 443642d218

@ -2,8 +2,10 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_picker/flutter_picker.dart'; import 'package:flutter_picker/flutter_picker.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:fluwx/fluwx.dart'; import 'package:fluwx/fluwx.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:jpush_flutter/jpush_flutter.dart'; import 'package:jpush_flutter/jpush_flutter.dart';
@ -20,6 +22,9 @@ import 'package:akuCommunity/utils/developer_util.dart';
void main() async { void main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent),
);
JPush jpush = new JPush(); JPush jpush = new JPush();
jpush.addEventHandler( jpush.addEventHandler(
// //
@ -80,7 +85,10 @@ class _MyAppState extends State<MyApp> {
FocusManager.instance.primaryFocus.unfocus(); FocusManager.instance.primaryFocus.unfocus();
} }
}, },
child: GetMaterialApp( child: ScreenUtilInit(
designSize: Size(750, 1334),
allowFontScaling: true,
builder: () => GetMaterialApp(
title: '智慧社区', title: '智慧社区',
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
theme: AppTheme.theme, theme: AppTheme.theme,
@ -99,6 +107,7 @@ class _MyAppState extends State<MyApp> {
navigatorObservers: [BotToastNavigatorObserver()], navigatorObservers: [BotToastNavigatorObserver()],
), ),
), ),
),
); );
} }
} }

@ -62,8 +62,6 @@ class _HomePageState extends State<HomePage>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
ScreenUtil.init(context,
designSize: Size(750, 1334), allowFontScaling: true);
AppProvider appProvider = Provider.of<AppProvider>(context); AppProvider appProvider = Provider.of<AppProvider>(context);
return Scaffold( return Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,

@ -61,8 +61,6 @@ class _SplashPageState extends State<SplashPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ScreenUtil.init(context,
designSize: Size(750, 1334), allowFontScaling: true);
return Scaffold( return Scaffold(
body: SizedBox( body: SizedBox(
height: 80, height: 80,

@ -451,7 +451,7 @@ packages:
name: flutter_screenutil name: flutter_screenutil
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.2.0" version: "4.0.3+3"
flutter_slidable: flutter_slidable:
dependency: "direct main" dependency: "direct main"
description: description:

@ -25,7 +25,7 @@ dependencies:
flutter_redux: ^0.5.3 flutter_redux: ^0.5.3
provider: ^4.1.3 provider: ^4.1.3
# 屏幕适配 # 屏幕适配
flutter_screenutil: ^3.2.0 flutter_screenutil: ^4.0.3+3
cupertino_icons: ^1.0.0 cupertino_icons: ^1.0.0
# 打电话等各种功能 # 打电话等各种功能
url_launcher: 5.5.2 url_launcher: 5.5.2

Loading…
Cancel
Save