Skip to content

Commit 96f9f8f

Browse files
committed
chore: update example apps to use dart_eval 0.7.9, support flutter 3.22.+
1 parent a4c354b commit 96f9f8f

File tree

8 files changed

+7
-60
lines changed

8 files changed

+7
-60
lines changed

.github/workflows/generate_bindings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
11-
- uses: subosito/flutter-action@v2
11+
- uses: monterail/flutter-action@v1
1212
with:
1313
channel: 'stable'
1414
- run: make flutter_bindings

example/lib/main.dart

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class EvalExample extends StatelessWidget {
1010

1111
@override
1212
Widget build(BuildContext context) {
13-
return const EvalWidget(
13+
return const CompilerWidget(
1414
packages: {
1515
'example': {
1616
'main.dart': '''
@@ -64,7 +64,7 @@ class EvalExample extends StatelessWidget {
6464
),
6565
Text(
6666
'\$_counter',
67-
style: Theme.of(context).textTheme.headline4,
67+
style: Theme.of(context).textTheme.titleSmall,
6868
),
6969
],
7070
)
@@ -82,13 +82,6 @@ class EvalExample extends StatelessWidget {
8282
}
8383
},
8484

85-
/// In debug mode, flutter_eval will continually re-generate a compiled
86-
/// EVC bytecode file for the given program, and save it to the specified
87-
/// assetPath. During runtime, it will instead load the compiled EVC file.
88-
/// To ensure this works, you must add the file path to the assets section of
89-
/// your pubspec.yaml file.
90-
assetPath: 'assets/program.evc',
91-
9285
/// Specify which library (i.e. which file) to use as an entrypoint.
9386
library: 'package:example/main.dart',
9487

example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99
dependencies:
1010
flutter:
1111
sdk: flutter
12-
dart_eval: ^0.7.8
12+
dart_eval: ^0.7.9
1313
flutter_eval:
1414
path: ../
1515

@@ -23,4 +23,4 @@ dev_dependencies:
2323
flutter:
2424
uses-material-design: true
2525
assets:
26-
- assets/program.evc
26+
# - assets/program.evc
1.33 KB
Binary file not shown.

examples/code_push_app/hot_update/.dart_eval/bindings/flutter_eval.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

examples/code_push_app/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies:
2323
cupertino_icons: ^1.0.6
2424
flutter_eval:
2525
path: ../../
26-
dart_eval: ^0.7.8
26+
dart_eval: ^0.7.9
2727

2828
dev_dependencies:
2929
flutter_test:

lib/src/material/text_theme.dart

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,6 @@ class $TextTheme implements $Instance {
105105
labelLarge: args[12]?.$value,
106106
labelMedium: args[13]?.$value,
107107
labelSmall: args[14]?.$value,
108-
headline1: args[15]?.$value,
109-
headline2: args[16]?.$value,
110-
headline3: args[17]?.$value,
111-
headline4: args[18]?.$value,
112-
headline5: args[19]?.$value,
113-
headline6: args[20]?.$value,
114-
subtitle1: args[21]?.$value,
115-
subtitle2: args[22]?.$value,
116-
bodyText1: args[23]?.$value,
117-
bodyText2: args[24]?.$value,
118-
caption: args[25]?.$value,
119-
button: args[26]?.$value,
120-
overline: args[27]?.$value,
121108
));
122109
}
123110

@@ -191,36 +178,6 @@ class $TextTheme implements $Instance {
191178
case 'labelSmall':
192179
final labelSmall = $value.labelSmall;
193180
return labelSmall == null ? const $null() : $TextStyle.wrap(labelSmall);
194-
case 'headline1':
195-
final headline1 = $value.headline1;
196-
return headline1 == null ? const $null() : $TextStyle.wrap(headline1);
197-
case 'headline2':
198-
final headline2 = $value.headline2;
199-
return headline2 == null ? const $null() : $TextStyle.wrap(headline2);
200-
case 'headline3':
201-
final headline3 = $value.headline3;
202-
return headline3 == null ? const $null() : $TextStyle.wrap(headline3);
203-
case 'headline4':
204-
final headline4 = $value.headline4;
205-
return headline4 == null ? const $null() : $TextStyle.wrap(headline4);
206-
case 'headline5':
207-
final headline5 = $value.headline5;
208-
return headline5 == null ? const $null() : $TextStyle.wrap(headline5);
209-
case 'headline6':
210-
final headline6 = $value.headline6;
211-
return headline6 == null ? const $null() : $TextStyle.wrap(headline6);
212-
case 'subtitle1':
213-
final subtitle1 = $value.subtitle1;
214-
return subtitle1 == null ? const $null() : $TextStyle.wrap(subtitle1);
215-
case 'subtitle2':
216-
final subtitle2 = $value.subtitle2;
217-
return subtitle2 == null ? const $null() : $TextStyle.wrap(subtitle2);
218-
case 'bodyText1':
219-
final bodyText1 = $value.bodyText1;
220-
return bodyText1 == null ? const $null() : $TextStyle.wrap(bodyText1);
221-
case 'bodyText2':
222-
final bodyText2 = $value.bodyText2;
223-
return bodyText2 == null ? const $null() : $TextStyle.wrap(bodyText2);
224181
}
225182

226183
throw UnimplementedError();

lib/src/material/theme_data.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ class $ThemeData implements $Instance {
119119
primaryColorDark: args[5]?.$value,
120120
canvasColor: args[6]?.$value,
121121
scaffoldBackgroundColor: args[7]?.$value,
122-
bottomAppBarColor: args[8]?.$value,
123122
cardColor: args[9]?.$value,
124123
dividerColor: args[10]?.$value,
125124
highlightColor: args[11]?.$value,
@@ -154,8 +153,6 @@ class $ThemeData implements $Instance {
154153
return $Color.wrap($value.canvasColor);
155154
case 'scaffoldBackgroundColor':
156155
return $Color.wrap($value.scaffoldBackgroundColor);
157-
case 'bottomAppBarColor':
158-
return $Color.wrap($value.bottomAppBarColor);
159156
case 'cardColor':
160157
return $Color.wrap($value.cardColor);
161158
case 'dividerColor':

0 commit comments

Comments
 (0)