Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Flutter 3.10 beta #1746

Merged
merged 56 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
fb798c7
Add `unnecessary_breaks` lint (#1709)
domesticmouse Apr 26, 2023
ae6df34
Merge branch 'master' of https://github.com/flutter/samples into beta
domesticmouse Apr 26, 2023
9b7dc57
Update `animations` Runners
domesticmouse Apr 26, 2023
18b1768
Update `desktop_photo_search` runners
domesticmouse Apr 26, 2023
da70765
Merge branch 'main' of https://github.com/flutter/samples into beta
domesticmouse May 2, 2023
3de23dd
Update CI
domesticmouse May 2, 2023
4dd7982
Merge branch 'main' of https://github.com/flutter/samples into beta
domesticmouse May 2, 2023
10ccb00
Fixup `code_sharing`
domesticmouse May 2, 2023
5016121
Format `deeplink_store_example`
domesticmouse May 2, 2023
e7ae35e
Format `experimental/material3_demo`
domesticmouse May 2, 2023
a679e5b
`const` migration
domesticmouse May 2, 2023
bc667f4
Elide `federated_plugin` from CI
domesticmouse May 2, 2023
6c422af
Merge branch 'main' of https://github.com/flutter/samples into beta
domesticmouse May 2, 2023
1f04236
Merge branch 'beta' of https://github.com/flutter/samples into beta
domesticmouse May 2, 2023
7bdb377
Elide `experimental/context_menus` from master CI
domesticmouse May 2, 2023
bb0cfb3
Pull `experimental/material_3_demo` from CI
domesticmouse May 2, 2023
bc3884f
Elide `material_3_demo` from `master` and `beta` CI
domesticmouse May 2, 2023
d33978b
More elides
domesticmouse May 2, 2023
cf0c491
Update `simplistic_calculator`
domesticmouse May 2, 2023
3055c15
`sdk: ^3.0.0-0`
domesticmouse May 2, 2023
1079dc2
Drop `break`s
domesticmouse May 2, 2023
89a6e9b
Drop moar `break`s
domesticmouse May 2, 2023
b0b804d
Yet more `break`s
domesticmouse May 2, 2023
8cdfa48
Elide `experimental/pedometer`
domesticmouse May 2, 2023
9186be7
Fixup `deeplink_store_example`
domesticmouse May 2, 2023
57f25e8
Update CI project list
domesticmouse May 2, 2023
1221a76
Mark up Flutter 3.10 beta breakages with tracking issues
domesticmouse May 2, 2023
abac89d
whups
domesticmouse May 2, 2023
2a49320
`dart run ffigen --config ffigen.yaml`
domesticmouse May 2, 2023
d5b4342
Update `experimental/pedometer`'s `ffigen` version
domesticmouse May 2, 2023
13086d0
`window` singleton fix
domesticmouse May 2, 2023
cb17c4a
Copy `experimental/material_3_demo` over `material_3_demo`
domesticmouse May 2, 2023
db0efb9
Add back CI
domesticmouse May 2, 2023
39d8f67
Fixup `material_3_demo`
domesticmouse May 2, 2023
f7c0337
Update `experimental/pedometer`
domesticmouse May 2, 2023
8b311f2
[web] Move embedding example out of experimental. (#1763)
ditman May 3, 2023
eb75bf5
`experimental/pedometer` Update `ffigen` to 8.0.0
domesticmouse May 3, 2023
1307ed3
`experimental/pedometer`: Update `jnigen` to 0.4.0
domesticmouse May 3, 2023
3fffaff
Fixup `federated_plugin` and friends
domesticmouse May 3, 2023
7e2c507
`platform_channels`: partial port
domesticmouse May 3, 2023
507dd1b
Merge branch 'main' into beta
domesticmouse May 3, 2023
64ea2ae
[web] Publish ng-flutter example. (#1773)
ditman May 3, 2023
0104204
Merge branch 'master' of https://github.com/flutter/samples into beta
domesticmouse May 6, 2023
049743b
Update deeplink_store_example to Dart 3 (#1789)
johnpryan May 9, 2023
185b332
Update flutter_maps_firestore to Dart 3 (#1792)
johnpryan May 9, 2023
6b80a89
Update form_app to Dart 3 (#1790)
johnpryan May 9, 2023
d50bd44
Update isolate_example to Dart 3 (#1794)
johnpryan May 9, 2023
7e3e2ad
Update animations to Dart 3 (#1788)
johnpryan May 9, 2023
6070c8c
Update simplistic_calculator to Dart 3 (#1799)
johnpryan May 9, 2023
1bd83a3
Update platform_design to Dart 3 (#1798)
johnpryan May 9, 2023
81bf715
Update platform_channels to Dart 3 (#1797)
johnpryan May 9, 2023
9bc072d
Update place_tracker to Dart 3 (#1796)
johnpryan May 9, 2023
2a5068d
Update infinite_list to Dart 3 (#1793)
johnpryan May 9, 2023
5a47cfa
Merge branch 'master' of https://github.com/flutter/samples into beta
domesticmouse May 9, 2023
afc3736
Drop `experimental/element_embedding_demo`
domesticmouse May 9, 2023
96301ae
`dart format`
domesticmouse May 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions isolate_example/lib/infinite_process_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,12 @@ class InfiniteProcessIsolateController extends ChangeNotifier {

void listen() {
receivePort.listen((dynamic message) {
switch(message){
switch (message) {
case SendPort():
newIceSP = message;
newIceSP.send(_currentMultiplier);
case int():
setCurrentResults(message);

}
});
}
Expand Down
3 changes: 2 additions & 1 deletion web_embedding/ng-flutter/flutter/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class MyApp extends StatefulWidget {
}

class _MyAppState extends State<MyApp> {
final ValueNotifier<DemoScreen> _screen = ValueNotifier<DemoScreen>(DemoScreen.counter);
final ValueNotifier<DemoScreen> _screen =
ValueNotifier<DemoScreen>(DemoScreen.counter);
final ValueNotifier<int> _counter = ValueNotifier<int>(0);
final ValueNotifier<String> _text = ValueNotifier<String>('');

Expand Down
6 changes: 4 additions & 2 deletions web_embedding/ng-flutter/flutter/lib/pages/counter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class _CounterDemoState extends State<CounterDemo> {
'You have pushed the button this many times:',
),
ValueListenableBuilder(
valueListenable: widget.counter,
valueListenable: widget.counter,
builder: (context, value, child) => Text(
'$value',
style: Theme.of(context).textTheme.headlineMedium,
Expand All @@ -38,7 +38,9 @@ class _CounterDemoState extends State<CounterDemo> {
),
),
floatingActionButton: FloatingActionButton(
onPressed: () { widget.counter.value++; },
onPressed: () {
widget.counter.value++;
},
tooltip: 'Increment',
child: const Icon(Icons.add),
),
Expand Down
42 changes: 19 additions & 23 deletions web_embedding/ng-flutter/flutter/lib/pages/dash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ class _DashDemoState extends State<DashDemo> {
super.initState();
// Initial value of the text box
totalCharCount = widget.text.value.length;
textController = TextEditingController.fromValue(
TextEditingValue(
textController = TextEditingController.fromValue(TextEditingValue(
text: widget.text.value,
selection: TextSelection.collapsed(offset: widget.text.value.length)
)
);
selection: TextSelection.collapsed(offset: widget.text.value.length)));
// Report changes
textController.addListener(_onTextControllerChange);
// Listen to changes from the outside
Expand Down Expand Up @@ -77,35 +74,34 @@ class _DashDemoState extends State<DashDemo> {
Text(
'COUNT WITH DASH!',
style: Theme.of(context).textTheme.titleLarge!.copyWith(
color: Colors.white,
),
color: Colors.white,
),
),
// Bordered dash avatar
Padding(
padding: const EdgeInsets.all(12),
child: ClipOval(
child: Container(
color: Colors.white,
padding: const EdgeInsets.all(2),
child: ClipOval(
child: Container(
color: colorPrimary,
padding: const EdgeInsets.all(2),
child: const CircleAvatar(
radius: 45,
backgroundColor: Colors.white,
foregroundImage: AssetImage('assets/dash.png'),
)
),
)
),
color: Colors.white,
padding: const EdgeInsets.all(2),
child: ClipOval(
child: Container(
color: colorPrimary,
padding: const EdgeInsets.all(2),
child: const CircleAvatar(
radius: 45,
backgroundColor: Colors.white,
foregroundImage:
AssetImage('assets/dash.png'),
)),
)),
Comment on lines +96 to +97
Copy link
Member

@miquelbeltran miquelbeltran May 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It be good to add trailing comas here, but not a big deal

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ditman thoughts?

),
),
Text(
'$totalCharCount',
style: Theme.of(context).textTheme.displayLarge!.copyWith(
color: Colors.white,
),
color: Colors.white,
),
),
],
),
Expand Down
7 changes: 2 additions & 5 deletions web_embedding/ng-flutter/flutter/lib/pages/text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ class _TextFieldDemoState extends State<TextFieldDemo> {
void initState() {
super.initState();
// Initial value of the text box
textController = TextEditingController.fromValue(
TextEditingValue(
textController = TextEditingController.fromValue(TextEditingValue(
text: widget.text.value,
selection: TextSelection.collapsed(offset: widget.text.value.length)
)
);
selection: TextSelection.collapsed(offset: widget.text.value.length)));
// Report changes
textController.addListener(_onTextControllerChange);
// Listen to changes from the outside
Expand Down
1 change: 0 additions & 1 deletion web_embedding/ng-flutter/flutter/lib/src/js_interop.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/// Exposes useful functions to interop with JS from our Flutter app.
library example_js_interop;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class DemoAppStateManager {
required ValueNotifier<DemoScreen> screen,
required ValueNotifier<int> counter,
required ValueNotifier<String> text,
}) : _counter = counter, _text = text, _screen = screen;
}) : _counter = counter,
_text = text,
_screen = screen;

final ValueNotifier<DemoScreen> _screen;
final ValueNotifier<int> _counter;
Expand All @@ -34,12 +36,15 @@ class DemoAppStateManager {
int getClicks() {
return _counter.value;
}

void setClicks(int value) {
_counter.value = value;
}

void incrementClicks() {
_counter.value++;
}

void decrementClicks() {
_counter.value--;
}
Expand Down
5 changes: 4 additions & 1 deletion web_embedding/ng-flutter/flutter/lib/src/js_interop/dom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class DomCustomEvent {
external factory DomCustomEvent.withOptions(JSString type, JSAny options);
factory DomCustomEvent._(String type, [Object? options]) {
if (options != null) {
return DomCustomEvent.withOptions(type.toJS, js_util.jsify(options) as JSAny);
return DomCustomEvent.withOptions(
type.toJS, js_util.jsify(options) as JSAny);
}
return DomCustomEvent.withType(type.toJS);
}
Expand All @@ -31,6 +32,7 @@ dispatchCustomEvent(DomElement target, String type, Object data) {
@JS()
@staticInterop
class DomEventTarget {}

extension DomEventTargetExtension on DomEventTarget {
@JS('dispatchEvent')
external JSBoolean _dispatchEvent(DomCustomEvent event);
Expand All @@ -40,6 +42,7 @@ extension DomEventTargetExtension on DomEventTarget {
@JS()
@staticInterop
class DomElement extends DomEventTarget {}

extension DomElementExtension on DomElement {
@JS('querySelector')
external DomElement? _querySelector(JSString selectors);
Expand Down