Skip to content

Commit a15fa4f

Browse files
committed
Refactor & Migrate to Flutter 3.22
1 parent 2f0e9cb commit a15fa4f

File tree

203 files changed

+8293
-8531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+8293
-8531
lines changed

android/app/src/debug/AndroidManifest.xml

-8
This file was deleted.
+7-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.divine">
2-
32
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
4-
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
5-
<uses-permission android:name="android.permission.INTERNET"/>
6-
<uses-permission android:name="android.permission.VIBRATE"/>
3+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
4+
<uses-permission android:name="android.permission.INTERNET" />
5+
<uses-permission android:name="android.permission.VIBRATE" />
76
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
87
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
98
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
@@ -15,7 +14,6 @@
1514
<application
1615
android:label="Divine"
1716
android:icon="@mipmap/app_icon">
18-
1917
<activity
2018
android:name=".MainActivity"
2119
android:exported="true"
@@ -26,21 +24,19 @@
2624
android:windowSoftInputMode="adjustResize">
2725
<meta-data
2826
android:name="io.flutter.embedding.android.NormalTheme"
29-
android:resource="@style/NormalTheme"/>
27+
android:resource="@style/NormalTheme" />
3028
<intent-filter>
31-
<action android:name="android.intent.action.MAIN"/>
32-
<category android:name="android.intent.category.LAUNCHER"/>
29+
<action android:name="android.intent.action.MAIN" />
30+
<category android:name="android.intent.category.LAUNCHER" />
3331
</intent-filter>
3432
</activity>
3533
<activity
3634
android:name="com.yalantis.ucrop.UCropActivity"
3735
android:screenOrientation="portrait"
38-
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
36+
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
3937

4038
<meta-data
4139
android:name="flutterEmbedding"
4240
android:value="2" />
43-
4441
</application>
45-
4642
</manifest>

android/app/src/profile/AndroidManifest.xml

-8
This file was deleted.
File renamed without changes.

lib/audio/audio_overlay_bottom_sheet.dart

-481
This file was deleted.

lib/components/custom_card.dart lib/component/custom_card.dart

+1-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ import 'package:flutter/material.dart';
22

33
class CustomCard extends StatelessWidget {
44
final Widget? child;
5-
65
final BorderRadius? borderRadius;
7-
86
final bool elevated;
9-
107
final Function()? onTap;
118

129
const CustomCard({
@@ -22,8 +19,7 @@ class CustomCard extends StatelessWidget {
2219
return Container(
2320
decoration: BoxDecoration(
2421
borderRadius: borderRadius,
25-
color: Theme.of(context).colorScheme.background
26-
),
22+
color: Theme.of(context).colorScheme.surface),
2723
child: Material(
2824
type: MaterialType.transparency,
2925
borderRadius: borderRadius,
@@ -36,5 +32,3 @@ class CustomCard extends StatelessWidget {
3632
);
3733
}
3834
}
39-
40-
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,54 @@
1-
import 'package:divine/components/custom_card.dart';
1+
import 'package:divine/component/custom_card.dart';
2+
import 'package:divine/utility/commom_utility.dart';
3+
24
import 'package:flutter/material.dart';
35
import 'package:google_fonts/google_fonts.dart';
46
import 'package:ionicons/ionicons.dart';
57

68
class PasswordFormBuilder extends StatefulWidget {
79
final String? initialValue;
10+
final String? hintText;
11+
final String? whichPage;
812

913
final bool? enabled;
10-
11-
final String? hintText;
14+
final bool obscureText;
1215

1316
final TextInputType? textInputType;
14-
1517
final TextEditingController? controller;
16-
1718
final TextInputAction? textInputAction;
18-
19-
final bool obscureText;
20-
2119
final FocusNode? focusNode, nextFocusNode;
22-
2320
final VoidCallback? submitAction;
24-
2521
final FormFieldValidator<String>? validateFunction;
2622

2723
final void Function(String)? onSaved, onChange;
2824

29-
final String? whichPage;
25+
final CommomUtility commomUtility = CommomUtility();
3026

3127
// ignore: overridden_fields
3228
@override
3329
final Key? key;
3430
final IconData? prefix;
3531
final IconData? suffix;
3632

37-
const PasswordFormBuilder({
38-
this.prefix,
39-
this.suffix,
40-
this.initialValue,
41-
this.enabled,
42-
this.hintText,
43-
this.textInputType,
44-
this.controller,
45-
this.textInputAction,
46-
this.nextFocusNode,
47-
this.focusNode,
48-
this.submitAction,
49-
this.obscureText = false,
50-
this.validateFunction,
51-
this.onSaved,
52-
this.onChange,
53-
required this.whichPage,
54-
this.key
55-
}) : super(key: key);
33+
PasswordFormBuilder(
34+
{this.prefix,
35+
this.suffix,
36+
this.initialValue,
37+
this.enabled,
38+
this.hintText,
39+
this.textInputType,
40+
this.controller,
41+
this.textInputAction,
42+
this.nextFocusNode,
43+
this.focusNode,
44+
this.submitAction,
45+
this.obscureText = false,
46+
this.validateFunction,
47+
this.onSaved,
48+
this.onChange,
49+
required this.whichPage,
50+
this.key})
51+
: super(key: key);
5652

5753
@override
5854
State<PasswordFormBuilder> createState() => _PasswordFormBuilderState();
@@ -111,20 +107,23 @@ class _PasswordFormBuilderState extends State<PasswordFormBuilder> {
111107
textInputAction: widget.textInputAction,
112108
focusNode: widget.focusNode,
113109
decoration: InputDecoration(
114-
prefixIcon: Icon(
115-
widget.prefix,
116-
size: 20.0,
117-
color: widget.whichPage == 'login' ? Colors.orange : Colors.blue
118-
),
110+
prefixIcon: Icon(widget.prefix,
111+
size: 20.0,
112+
color: widget.whichPage == 'login'
113+
? Colors.orange
114+
: Colors.blue),
119115
suffixIcon: GestureDetector(
120116
onTap: () {
121117
setState(() => obscureText = !obscureText);
122118
},
123119
child: Icon(
124-
obscureText ? widget.suffix : Ionicons.eye_off_outline,
125-
size: 20.0,
126-
color: widget.whichPage == 'login' ? Colors.orange : Colors.blue
127-
),
120+
obscureText
121+
? widget.suffix
122+
: Ionicons.eye_off_outline,
123+
size: 20.0,
124+
color: widget.whichPage == 'login'
125+
? Colors.orange
126+
: Colors.blue),
128127
),
129128
filled: true,
130129
fillColor: Colors.grey[200],
@@ -136,9 +135,9 @@ class _PasswordFormBuilderState extends State<PasswordFormBuilder> {
136135
height: 1.2,
137136
),
138137
contentPadding: const EdgeInsets.all(15.0),
139-
border: border(context),
140-
enabledBorder: border(context),
141-
focusedBorder: focusBorder(context),
138+
border: widget.commomUtility.border(context),
139+
enabledBorder: widget.commomUtility.border(context),
140+
focusedBorder: widget.commomUtility.focusBorder(context),
142141
errorStyle: const TextStyle(height: 10.0, fontSize: 0.0),
143142
))),
144143
),
@@ -155,28 +154,4 @@ class _PasswordFormBuilderState extends State<PasswordFormBuilder> {
155154
]),
156155
);
157156
}
158-
159-
border(BuildContext context) {
160-
return const OutlineInputBorder(
161-
borderRadius: BorderRadius.all(
162-
Radius.circular(20.0),
163-
),
164-
borderSide: BorderSide(
165-
color: Colors.white,
166-
width: 0.0,
167-
),
168-
);
169-
}
170-
171-
focusBorder(BuildContext context) {
172-
return OutlineInputBorder(
173-
borderRadius: const BorderRadius.all(
174-
Radius.circular(20.0),
175-
),
176-
borderSide: BorderSide(
177-
color: Theme.of(context).colorScheme.secondary,
178-
width: 1.0,
179-
),
180-
);
181-
}
182157
}

0 commit comments

Comments
 (0)