Mounir-Bouaiche

Update README.md

@@ -40,10 +40,11 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -40,10 +40,11 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
40 ### Property 40 ### Property
41 41
42 | Property | Type | Default Value | Description | 42 | Property | Type | Default Value | Description |
43 -| --------------- | ------------- | -------------- | ---------------------------------------------------------------------- | 43 +| --------------- | ------------ | ------------- | ---------------------------------------------------------------------- |
44 | deviceSize | Size | null | The size of the physical device | 44 | deviceSize | Size | null | The size of the physical device |
45 -| designSize | Size | Size(360, 690) | The size of the device screen in the design draft, in dp |  
46 -| builder | WidgetBuilder | (*required*) | Generally returning a Function of MaterialApp type | 45 +| designSize | Size | Size(360,690) | The size of the device screen in the design draft, in dp |
  46 +| builder | Function | null | Generally returning a Function of MaterialApp type |
  47 +| child | Widget | null | A part of builder that never being rebuilt |
47 | orientation | Orientation | portrait | screen orientation | 48 | orientation | Orientation | portrait | screen orientation |
48 | splitScreenMode | bool | false | support for split screen | 49 | splitScreenMode | bool | false | support for split screen |
49 | minTextAdapt | bool | false | Whether to adapt the text according to the minimum of width and height | 50 | minTextAdapt | bool | false | Whether to adapt the text according to the minimum of width and height |
@@ -66,20 +67,19 @@ class MyApp extends StatelessWidget { @@ -66,20 +67,19 @@ class MyApp extends StatelessWidget {
66 designSize: Size(360, 690), 67 designSize: Size(360, 690),
67 minTextAdapt: true, 68 minTextAdapt: true,
68 splitScreenMode: true, 69 splitScreenMode: true,
69 - builder: (_) { 70 + builder: (child) {
70 return MaterialApp( 71 return MaterialApp(
71 debugShowCheckedModeBanner: false, 72 debugShowCheckedModeBanner: false,
72 - // Use this line to prevent extra rebuilds  
73 - useInheritedMediaQuery: true,  
74 title: 'First Method', 73 title: 'First Method',
75 // You can use the library anywhere in the app even in theme 74 // You can use the library anywhere in the app even in theme
76 theme: ThemeData( 75 theme: ThemeData(
77 primarySwatch: Colors.blue, 76 primarySwatch: Colors.blue,
78 textTheme: TextTheme(bodyText2: TextStyle(fontSize: 30.sp)), 77 textTheme: TextTheme(bodyText2: TextStyle(fontSize: 30.sp)),
79 ), 78 ),
80 - home: HomePage(title: 'First Method'), 79 + home: child,
81 ); 80 );
82 }, 81 },
  82 + child: HomePage(title: 'First Method'),
83 ); 83 );
84 } 84 }
85 } 85 }