Skip to content

Commit

Permalink
added settings and about page
Browse files Browse the repository at this point in the history
and changed the navigator
  • Loading branch information
netharuM committed Apr 17, 2022
1 parent a6d1aa4 commit 23ea69f
Show file tree
Hide file tree
Showing 7 changed files with 467 additions and 58 deletions.
68 changes: 37 additions & 31 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,41 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
<application
android:label="whatskit"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
</queries>
<application
android:label="whatskit"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
69 changes: 45 additions & 24 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:whatskit/pages/settings_page.dart';
import 'package:whatskit/pages/statuses_page.dart';
import 'package:whatskit/pages/video_timmer.dart';

Expand Down Expand Up @@ -28,6 +29,7 @@ class MyApp extends StatelessWidget {
selectedItemColor: const Color(0xff00a884),
unselectedItemColor: Colors.white.withOpacity(0.5),
),
dividerColor: Colors.white,
),
home: const App(),
);
Expand All @@ -42,34 +44,53 @@ class App extends StatefulWidget {
}

class _AppState extends State<App> {
int _pageIndex = 0;

final List<Widget> _pages = [
const StatusesPage(),
const VideoTrimmerPage(),
];

@override
Widget build(BuildContext context) {
return Scaffold(
body: _pages[_pageIndex],
bottomNavigationBar: BottomNavigationBar(
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.video_collection),
label: 'statuses',
return DefaultTabController(
length: 3,
child: Scaffold(
bottomNavigationBar: Container(
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
),
BottomNavigationBarItem(
icon: Icon(Icons.cut_rounded),
label: 'trimmer',
child: TabBar(
indicatorColor: Theme.of(context).primaryColor,
tabs: [
Tab(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Icon(Icons.video_collection_rounded),
SizedBox(width: 8),
Text('statuses'),
]),
),
Tab(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Icon(Icons.cut),
SizedBox(width: 8),
Text('trimmer'),
]),
),
Tab(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Icon(Icons.settings),
SizedBox(width: 8),
Text('settings'),
]),
),
],
),
],
currentIndex: _pageIndex,
onTap: (int index) {
setState(() {
_pageIndex = index;
});
},
),
body: const TabBarView(children: [
StatusesPage(),
VideoTrimmerPage(),
SettingsPage(),
]),
),
);
}
Expand Down
Loading

0 comments on commit 23ea69f

Please sign in to comment.