Skip to content

Commit 9eb7b68

Browse files
committed
get 5.0.0-release-candidate-9.3.0
1 parent e361c6b commit 9eb7b68

File tree

10 files changed

+108
-64
lines changed

10 files changed

+108
-64
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [5.0.0-release-candidate-9.3.0]
2+
3+
- Support for Flutter 3.29.0
4+
5+
- Remove remaining dart:html references
6+
17
## [5.0.0-release-candidate-9.2.1]
28

39
- Remove remaining dart:html references

example/.metadata

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819"
7+
revision: "35c388afb57ef061d06a39b537336c87e0e3d1b1"
88
channel: "stable"
99

1010
project_type: app
@@ -13,11 +13,11 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
17-
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
18-
- platform: android
19-
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
20-
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
16+
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
17+
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
18+
- platform: ios
19+
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
20+
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
2121

2222
# User provided section
2323

example/lib/main.dart

+25-21
Original file line numberDiff line numberDiff line change
@@ -132,28 +132,32 @@ class Second extends StatelessWidget {
132132
Widget build(BuildContext context) {
133133
final controller = Get.put(SecondController());
134134
print('second rebuild');
135-
return Scaffold(
136-
appBar: AppBar(
137-
title: Text('page two ${Get.parameters["id"]}'),
138-
),
139-
body: Center(
140-
child: Column(
141-
children: [
142-
Expanded(
143-
child: TextField(
144-
controller: controller.textEdit,
145-
)),
146-
SizedBox(
147-
height: 300,
148-
width: 300,
149-
child: ElevatedButton(
150-
onPressed: () {
151-
Get.toNamed('/third');
152-
},
153-
child: const Text('next screen'),
135+
return PopScope(
136+
canPop: false,
137+
onPopInvokedWithResult: (didPop, result) => print('pop invoked'),
138+
child: Scaffold(
139+
appBar: AppBar(
140+
title: Text('page two ${Get.parameters["id"]}'),
141+
),
142+
body: Center(
143+
child: Column(
144+
children: [
145+
Expanded(
146+
child: TextField(
147+
controller: controller.textEdit,
148+
)),
149+
SizedBox(
150+
height: 300,
151+
width: 300,
152+
child: ElevatedButton(
153+
onPressed: () {
154+
Get.toNamed('/third');
155+
},
156+
child: const Text('next screen'),
157+
),
154158
),
155-
),
156-
],
159+
],
160+
),
157161
),
158162
),
159163
);

example/test/widget_test.dart

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// This is a basic Flutter widget test.
2+
//
3+
// To perform an interaction with a widget in your test, use the WidgetTester
4+
// utility in the flutter_test package. For example, you can send tap and scroll
5+
// gestures. You can also use WidgetTester to find child widgets in the widget
6+
// tree, read text, and verify that the values of widget properties are correct.
7+
8+
import 'package:flutter/material.dart';
9+
import 'package:flutter_test/flutter_test.dart';
10+
11+
import 'package:get_demo/main.dart';
12+
13+
void main() {
14+
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15+
// Build our app and trigger a frame.
16+
await tester.pumpWidget(const MyApp());
17+
18+
// Verify that our counter starts at 0.
19+
expect(find.text('0'), findsOneWidget);
20+
expect(find.text('1'), findsNothing);
21+
22+
// Tap the '+' icon and trigger a frame.
23+
await tester.tap(find.byIcon(Icons.add));
24+
await tester.pump();
25+
26+
// Verify that our counter has incremented.
27+
expect(find.text('0'), findsNothing);
28+
expect(find.text('1'), findsOneWidget);
29+
});
30+
}

lib/get_navigation/src/extension_navigation.dart

+34-31
Original file line numberDiff line numberDiff line change
@@ -234,37 +234,40 @@ extension ExtensionDialog on GetInterface {
234234
}
235235
}
236236

237-
Widget baseAlertDialog = AlertDialog(
238-
titlePadding: titlePadding ?? const EdgeInsets.all(8),
239-
contentPadding: contentPadding ?? const EdgeInsets.all(8),
240-
241-
backgroundColor: backgroundColor ?? theme.dialogBackgroundColor,
242-
shape: RoundedRectangleBorder(
243-
borderRadius: BorderRadius.all(Radius.circular(radius))),
244-
title: Text(title, textAlign: TextAlign.center, style: titleStyle),
245-
content: Column(
246-
crossAxisAlignment: CrossAxisAlignment.center,
247-
mainAxisSize: MainAxisSize.min,
248-
children: [
249-
content ??
250-
Text(middleText,
251-
textAlign: TextAlign.center, style: middleTextStyle),
252-
const SizedBox(height: 16),
253-
ButtonTheme(
254-
minWidth: 78.0,
255-
height: 34.0,
256-
child: Wrap(
257-
alignment: WrapAlignment.center,
258-
spacing: 8,
259-
runSpacing: 8,
260-
children: actions,
261-
),
262-
)
263-
],
264-
),
265-
// actions: actions, // ?? <Widget>[cancelButton, confirmButton],
266-
buttonPadding: EdgeInsets.zero,
267-
);
237+
Widget baseAlertDialog = Builder(builder: (context) {
238+
return AlertDialog(
239+
titlePadding: titlePadding ?? const EdgeInsets.all(8),
240+
contentPadding: contentPadding ?? const EdgeInsets.all(8),
241+
242+
backgroundColor:
243+
backgroundColor ?? DialogTheme.of(context).backgroundColor,
244+
shape: RoundedRectangleBorder(
245+
borderRadius: BorderRadius.all(Radius.circular(radius))),
246+
title: Text(title, textAlign: TextAlign.center, style: titleStyle),
247+
content: Column(
248+
crossAxisAlignment: CrossAxisAlignment.center,
249+
mainAxisSize: MainAxisSize.min,
250+
children: [
251+
content ??
252+
Text(middleText,
253+
textAlign: TextAlign.center, style: middleTextStyle),
254+
const SizedBox(height: 16),
255+
ButtonTheme(
256+
minWidth: 78.0,
257+
height: 34.0,
258+
child: Wrap(
259+
alignment: WrapAlignment.center,
260+
spacing: 8,
261+
runSpacing: 8,
262+
children: actions!,
263+
),
264+
)
265+
],
266+
),
267+
// actions: actions, // ?? <Widget>[cancelButton, confirmButton],
268+
buttonPadding: EdgeInsets.zero,
269+
);
270+
});
268271

269272
return dialog<T>(
270273
onWillPop != null

lib/get_navigation/src/router_report.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class RouterReportManager<T> {
117117
_routesKey[routeName]?.remove(element);
118118
}
119119
}
120-
120+
121121
_routesKey.remove(routeName);
122122

123123
keysToRemove.clear();

lib/get_navigation/src/routes/get_navigator.dart

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class GetNavigator extends Navigator {
5252
super.initialRoute,
5353
super.restorationScopeId,
5454
}) : super(
55-
//keys should be optional
5655
onPopPage: onPopPage ??
5756
(route, result) {
5857
final didPop = route.didPop(result);

lib/get_navigation/src/routes/observers/route_observer.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class _RouteData {
205205
final bool isDialog;
206206
final String? name;
207207

208-
_RouteData({
208+
const _RouteData({
209209
required this.name,
210210
required this.isGetPageRoute,
211211
required this.isBottomSheet,

lib/get_state_manager/src/simple/get_state.dart

+4-2
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,16 @@ abstract class Bind<T> extends StatelessWidget {
132132
);
133133
}
134134

135+
static bool fenixMode = false;
136+
135137
static Bind lazyPut<S>(
136138
InstanceBuilderCallback<S> builder, {
137139
String? tag,
138-
bool fenix = true,
140+
bool? fenix,
139141
// VoidCallback? onInit,
140142
VoidCallback? onClose,
141143
}) {
142-
Get.lazyPut<S>(builder, tag: tag, fenix: fenix);
144+
Get.lazyPut<S>(builder, tag: tag, fenix: fenix ?? fenixMode);
143145
return _FactoryBind<S>(
144146
tag: tag,
145147
// initState: (_) {

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: get
22
description: Open screens/snackbars/dialogs without context, manage states and inject dependencies easily with GetX.
3-
version: 5.0.0-release-candidate-9.2.1
3+
version: 5.0.0-release-candidate-9.3.0
44
homepage: https://github.com/jonataslaw/getx
55

66
environment:

0 commit comments

Comments
 (0)