upgrade min sdk; run formatter
This commit is contained in:
@@ -21,13 +21,12 @@ class MyAppState extends State<MyApp> {
|
||||
title: const Text('Native Fragment Example'),
|
||||
actions: [
|
||||
MenuAnchor(
|
||||
builder:
|
||||
(context, controller, child) => IconButton(
|
||||
onPressed: () {
|
||||
controller.open();
|
||||
},
|
||||
icon: const Icon(Icons.menu),
|
||||
),
|
||||
builder: (context, controller, child) => IconButton(
|
||||
onPressed: () {
|
||||
controller.open();
|
||||
},
|
||||
icon: const Icon(Icons.menu),
|
||||
),
|
||||
menuChildren: [
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
|
||||
@@ -5,7 +5,7 @@ description: "Demonstrates how to use the flutter_mozilla_components plugin."
|
||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
environment:
|
||||
sdk: '>=3.7.0 <4.0.0'
|
||||
sdk: '>=3.8.0 <4.0.0'
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
|
||||
@@ -42,13 +42,12 @@ abstract class Source {
|
||||
String? packageId,
|
||||
int? packageCategory,
|
||||
) {
|
||||
final caller =
|
||||
packageId != null
|
||||
? ExternalPackage(
|
||||
packageId: packageId,
|
||||
category: PackageCategory.fromInt(packageCategory).toValue(),
|
||||
)
|
||||
: null;
|
||||
final caller = packageId != null
|
||||
? ExternalPackage(
|
||||
packageId: packageId,
|
||||
category: PackageCategory.fromInt(packageCategory).toValue(),
|
||||
)
|
||||
: null;
|
||||
|
||||
switch (sourceId) {
|
||||
case 1:
|
||||
|
||||
+11
-12
@@ -25,18 +25,17 @@ class GeckoBrowserExtensionService extends BrowserExtensionEvents {
|
||||
.getMarkdown(htmlList)
|
||||
.timeout(timeout);
|
||||
|
||||
final results =
|
||||
markdownResult
|
||||
.cast()
|
||||
.map(
|
||||
(result) => TurndownResults(
|
||||
// ignore: avoid_dynamic_calls valid
|
||||
markdown: result['fullContentMarkdown'] as String,
|
||||
// ignore: avoid_dynamic_calls valid
|
||||
plain: result['fullContentPlain'] as String,
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
final results = markdownResult
|
||||
.cast()
|
||||
.map(
|
||||
(result) => TurndownResults(
|
||||
// ignore: avoid_dynamic_calls valid
|
||||
markdown: result['fullContentMarkdown'] as String,
|
||||
// ignore: avoid_dynamic_calls valid
|
||||
plain: result['fullContentPlain'] as String,
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
@@ -12,17 +12,16 @@ class GeckoPrefService {
|
||||
}
|
||||
|
||||
Future<Map<String, Object>> applyPrefs(Map<String, Object> prefs) {
|
||||
final buffer =
|
||||
prefs.entries.map((pref) {
|
||||
final value = switch (pref.value) {
|
||||
final bool x => '$x',
|
||||
final int x => '$x',
|
||||
final String x => '"$x"',
|
||||
_ => throw Exception('Unknow pref type'),
|
||||
};
|
||||
final buffer = prefs.entries.map((pref) {
|
||||
final value = switch (pref.value) {
|
||||
final bool x => '$x',
|
||||
final int x => '$x',
|
||||
final String x => '"$x"',
|
||||
_ => throw Exception('Unknow pref type'),
|
||||
};
|
||||
|
||||
return 'user_pref("${pref.key}", $value);';
|
||||
}).join();
|
||||
return 'user_pref("${pref.key}", $value);';
|
||||
}).join();
|
||||
|
||||
return _apiInstance.applyPrefs(buffer);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@ version: 0.0.1
|
||||
homepage:
|
||||
|
||||
environment:
|
||||
sdk: '>=3.7.0 <4.0.0'
|
||||
sdk: '>=3.8.0 <4.0.0'
|
||||
flutter: '>=3.3.0'
|
||||
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user