Skip to content

Commit 22bc57b

Browse files
committed
Upgrade to version 0.3.1
* Remove the audio player support from the package * Some code quality improvements
1 parent 4526692 commit 22bc57b

15 files changed

+50
-496
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.1
2+
3+
- Remove audio player support from the package
4+
15
## 0.3.0
26

37
- Add support for new UI widgets available in current FlutterFlow release

lib/src/utils/flutter_flow_animations.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,12 @@ extension AnimatedWidgetExtension on Widget {
7070

7171
class TiltEffect extends Effect<Offset> {
7272
const TiltEffect({
73-
Duration? delay,
74-
Duration? duration,
75-
Curve? curve,
73+
super.delay,
74+
super.duration,
75+
super.curve,
7676
Offset? begin,
7777
Offset? end,
7878
}) : super(
79-
delay: delay,
80-
duration: duration,
81-
curve: curve,
8279
begin: begin ?? const Offset(0.0, 0.0),
8380
end: end ?? const Offset(0.0, 0.0),
8481
);

lib/src/utils/flutter_flow_helpers.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ bool responsiveVisibility({
189189
const kTextValidatorUsernameRegex = r'^[a-zA-Z][a-zA-Z0-9_-]{2,16}$';
190190
// https://stackoverflow.com/a/201378
191191
const kTextValidatorEmailRegex =
192-
"^(?:[a-z0-9!#\$%&\'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#\$%&\'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])\$";
192+
"^(?:[a-z0-9!#\$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#\$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])\$";
193193
const kTextValidatorWebsiteRegex =
194194
r'(https?:\/\/)?(www\.)[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,10}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)|(https?:\/\/)?(www\.)?(?!ww)[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,10}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)';
195195

@@ -218,12 +218,12 @@ void showSnackbar(
218218
content: Row(
219219
children: [
220220
if (loading)
221-
Padding(
221+
const Padding(
222222
padding: EdgeInsetsDirectional.only(end: 10.0),
223-
child: Container(
223+
child: SizedBox(
224224
height: 20,
225225
width: 20,
226-
child: const CircularProgressIndicator(
226+
child: CircularProgressIndicator(
227227
color: Colors.white,
228228
),
229229
),

lib/src/utils/flutter_flow_model.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ abstract class FlutterFlowModel<W extends Widget> {
4444
initState(context);
4545
_isInitialized = true;
4646
}
47-
if (context.widget is W) _widget = context.widget as W;
47+
if (context.widget is W) {
48+
_widget = context.widget as W;
49+
}
4850
}
4951

5052
// The widget associated with this model. This is useful for accessing the
@@ -151,13 +153,13 @@ class FlutterFlowDynamicModels<T extends FlutterFlowModel> {
151153

152154
T? _getDefaultValue<T>() {
153155
switch (T) {
154-
case int:
156+
case const (int):
155157
return 0 as T;
156-
case double:
158+
case const (double):
157159
return 0.0 as T;
158-
case String:
160+
case const (String):
159161
return '' as T;
160-
case bool:
162+
case const (bool):
161163
return false as T;
162164
default:
163165
return null as T;

lib/src/utils/internationalization.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import 'package:flutter/material.dart';
21
import 'package:flutter/foundation.dart';
2+
import 'package:flutter/material.dart';
33

44
//Helper class for internationalization
55
class FFLocalizations {
@@ -9,7 +9,7 @@ class FFLocalizations {
99

1010
//Initializing
1111
static FFLocalizations of(BuildContext context) =>
12-
FFLocalizations(Locale('en'));
12+
FFLocalizations(const Locale('en'));
1313

1414
static List<String> languages() => ['en'];
1515

lib/src/widgets/flutter_flow_ad_banner.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ class _FlutterFlowAdBannerState extends State<FlutterFlowAdBanner> {
135135
print('\$BannerAd failedToLoad: \$error');
136136
ad.dispose();
137137
},
138-
onAdOpened: (Ad ad) => print('\$BannerAd onAdOpened.'),
139-
onAdClosed: (Ad ad) => print('\$BannerAd onAdClosed.'),
138+
onAdOpened: (ad) => print('\$BannerAd onAdOpened.'),
139+
onAdClosed: (ad) => print('\$BannerAd onAdClosed.'),
140140
),
141141
);
142142
await banner.load();

0 commit comments

Comments
 (0)