drew 5 lat temu
rodzic
commit
ccc1ec0566

+ 3 - 0
android/app/src/main/AndroidManifest.xml

@@ -5,6 +5,9 @@
          In most cases you can leave this as-is, but you if you want to provide
          additional functionality it is fine to subclass or reimplement
          FlutterApplication and put your custom class here. -->
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+
     <application
         android:name="io.flutter.app.FlutterApplication"
         android:label="江西军民融合"

+ 1 - 1
ios/Runner/Info.plist

@@ -11,7 +11,7 @@
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
-	<string>jmrh</string>
+	<string>江西军民融合</string>
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>

+ 35 - 30
lib/view/home/news.dart

@@ -177,41 +177,46 @@ class _NewsState extends State<News> with SingleTickerProviderStateMixin {
             title: Image.asset(
               'img/icon_logo.png',
               width: 217,
-              alignment: Alignment.center,
+              alignment: Alignment.bottomCenter,
             ),
             centerTitle: true,
             bottom: PreferredSize(
-              child: Container(
-                height: 40,
-                width: double.infinity,
-                color: Colors.white,
-                child: TabBar(
-                  isScrollable: true,
-                  indicatorSize: TabBarIndicatorSize.label,
-                  indicatorColor: Color(0xFFEA2D2F),
-                  labelColor: COLOR_PRIMARY,
-                  unselectedLabelColor: Color(0xFF939599),
-                  labelStyle: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
-                  unselectedLabelStyle: TextStyle(fontWeight: FontWeight.normal, fontSize: 14),
-                  tabs: [
-                    Container(
-                      width: 80,
-                      child: Tab(text: '通知公告'),
-                    ),
-                    Container(
-                      width: 80,
-                      child: Tab(text: '政策法规'),
-                    ),
-                  ],
-                  controller: _tabController,
-                  onTap: (index) {
-                    setState(() {
-                      _tabIndex = index;
-                    });
-                  },
+              child: SizedOverflowBox(
+                size: Size(double.infinity, 40),
+                alignment: Alignment.center,
+                child: Container(
+                  height: 42,
+                  width: double.infinity,
+                  alignment: Alignment.centerLeft,
+                  color: Colors.white,
+                  child: TabBar(
+                    isScrollable: true,
+                    indicatorSize: TabBarIndicatorSize.label,
+                    indicatorColor: Color(0xFFEA2D2F),
+                    labelColor: COLOR_PRIMARY,
+                    unselectedLabelColor: Color(0xFF939599),
+                    labelStyle: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
+                    unselectedLabelStyle: TextStyle(fontWeight: FontWeight.normal, fontSize: 14),
+                    tabs: [
+                      Container(
+                        width: 80,
+                        child: Tab(text: '通知公告'),
+                      ),
+                      Container(
+                        width: 80,
+                        child: Tab(text: '政策法规'),
+                      ),
+                    ],
+                    controller: _tabController,
+                    onTap: (index) {
+                      setState(() {
+                        _tabIndex = index;
+                      });
+                    },
+                  ),
                 ),
               ),
-              preferredSize: Size.fromHeight(50),
+              preferredSize: Size(double.infinity, 40),
             ),
           ),
 //          SliverToBoxAdapter(