Update for Flutter 3.10 beta (#1746)

## Pre-launch Checklist

- [x] I read the [Flutter Style Guide] _recently_, and have followed its
advice.
- [x] I signed the [CLA].
- [x] I read the [Contributors Guide].
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] All existing and new tests are passing.

---------

Co-authored-by: David Iglesias <ditman@gmail.com>
Co-authored-by: Mark Thompson <2554588+MarkTechson@users.noreply.github.com>
Co-authored-by: John Ryan <ryjohn@google.com>
pull/1801/head
Brett Morgan 1 year ago committed by GitHub
parent 474756ce04
commit 36e7a6ab04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,5 +17,6 @@ linter:
test_types_in_equals: true
throw_in_finally: true
unawaited_futures: true
unnecessary_breaks: true
unnecessary_statements: true
use_super_parameters: true

@ -3,7 +3,7 @@ description: Analysis defaults for flutter/samples
publish_to: none
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
# NOTE: Code is not allowed in this package. Do not add dependencies.
dependencies:

@ -6,7 +6,7 @@ publish_to: "none"
version: 1.0.0+1
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
flutter:

@ -4,7 +4,7 @@
# This file should be version controlled.
version:
revision: f732038a8cf4562ce38a1d7debb30209ae3da896
revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
channel: beta
project_type: app
@ -13,26 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: android
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: ios
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: linux
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: macos
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: web
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: windows
create_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
base_revision: f732038a8cf4562ce38a1d7debb30209ae3da896
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
# User provided section

@ -26,6 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace "dev.flutter.animations"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.animations">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.

@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.animations">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="animations"
android:name="${applicationName}"

@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.animations">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.

@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

@ -54,10 +54,11 @@ class _AnimatedBuilderDemoState extends State<AnimatedBuilderDemo>
),
child: child,
onPressed: () {
if (controller.status == AnimationStatus.completed) {
controller.reverse();
} else {
controller.forward();
switch (controller.status) {
case AnimationStatus.completed:
controller.reverse();
default:
controller.forward();
}
},
);

@ -72,10 +72,11 @@ class _AnimationControllerDemoState extends State<AnimationControllerDemo>
ElevatedButton(
child: const Text('animate'),
onPressed: () {
if (controller.status == AnimationStatus.completed) {
controller.reverse();
} else {
controller.forward();
switch (controller.status) {
case AnimationStatus.completed:
controller.reverse();
default:
controller.forward();
}
},
)

@ -54,15 +54,19 @@ class _TweenDemoState extends State<TweenDemo>
),
ElevatedButton(
child: Text(
controller.status == AnimationStatus.completed
? 'Buy a Mansion'
: 'Win Lottery',
switch (controller.status) {
AnimationStatus.completed => 'Buy a Mansion',
AnimationStatus.forward => 'Accruing...',
AnimationStatus.reverse => 'Spending...',
_ => 'Win the lottery',
},
),
onPressed: () {
if (controller.status == AnimationStatus.completed) {
controller.reverse();
} else {
controller.forward();
switch (controller.status) {
case AnimationStatus.completed:
controller.reverse();
default:
controller.forward();
}
},
)

@ -3,7 +3,7 @@ import FlutterMacOS
class MainFlutterWindow: NSWindow {
override func awakeFromNib() {
let flutterViewController = FlutterViewController.init()
let flutterViewController = FlutterViewController()
let windowFrame = self.frame
self.contentViewController = flutterViewController
self.setFrame(windowFrame, display: true)

@ -4,7 +4,7 @@ version: 1.0.0+1
publish_to: none
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
flutter:

@ -132,16 +132,12 @@ class SimpleDatabase {
RootIsolateToken rootIsolateToken = RootIsolateToken.instance!;
_sendPort
.send(_Command(_Codes.init, arg0: _path, arg1: rootIsolateToken));
break;
case _Codes.ack:
_completers.removeLast().complete();
break;
case _Codes.result:
_resultsStream.last.add(command.arg0 as String);
break;
case _Codes.done:
_resultsStream.removeLast().close();
break;
default:
debugPrint('SimpleDatabase unrecognized command: ${command.code}');
}
@ -198,13 +194,10 @@ class _SimpleDatabaseServer {
// ----------------------------------------------------------------------
BackgroundIsolateBinaryMessenger.ensureInitialized(rootIsolateToken);
_sendPort.send(const _Command(_Codes.ack, arg0: null));
break;
case _Codes.add:
_doAddEntry(command.arg0 as String);
break;
case _Codes.query:
_doFind(command.arg0 as String);
break;
default:
debugPrint(
'_SimpleDatabaseServer unrecognized command ${command.code}');

@ -6,7 +6,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
cupertino_icons: ^1.0.2

@ -109,9 +109,9 @@ class _MyHomePageState extends State<MyHomePage> {
),
if (isWriting) ...[
const SizedBox(height: 10),
Row(
const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const <Widget>[
children: <Widget>[
Text(
'Communicating with server...',
style: TextStyle(fontSize: 32, color: Colors.blue),

@ -4,7 +4,7 @@ publish_to: "none"
version: 1.0.0+1
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
cupertino_icons: ^1.0.2

@ -4,7 +4,7 @@ version: 1.0.0
publish_to: "none"
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
args: ^2.0.0

@ -3,7 +3,7 @@ description: Common data models required by our client and server
version: 1.0.0
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
freezed_annotation: ^2.1.0

@ -30,14 +30,18 @@ class MyApp extends StatelessWidget {
debugShowCheckedModeBanner: false,
routerConfig: GoRouter(
routes: [
GoRoute(path: '/', builder: (_, __) => const ProductList(),
GoRoute(
path: '/',
builder: (_, __) => const ProductList(),
routes: [
GoRoute(path: ':id', builder: (_, __) => const ProductDetails()),
],
),
GoRoute(path: '/category/:category', builder: (_, __) => const ProductCategoryList()),
GoRoute(
path: '/category/:category',
builder: (_, __) => const ProductCategoryList()),
],
),
);
}
}
}

@ -264,18 +264,12 @@ class ProductsRepository {
}
}
String getCategoryTitle(Category category) {
switch(category) {
case Category.all:
return 'All';
case Category.accessories:
return 'Accessories';
case Category.clothing:
return 'Clothing';
case Category.home:
return 'Home Decorations';
}
}
String getCategoryTitle(Category category) => switch (category) {
Category.all => 'All',
Category.accessories => 'Accessories',
Category.clothing => 'Clothing',
Category.home => 'Home Decorations'
};
class Product {
const Product({

@ -26,18 +26,21 @@ class ProductCategoryList extends StatelessWidget {
Widget build(BuildContext context) {
final GoRouterState state = GoRouterState.of(context);
final Category category = Category.values.firstWhere(
(Category value) => value.toString().contains(state.params['category']!),
(Category value) =>
value.toString().contains(state.pathParameters['category']!),
orElse: () => Category.all,
);
final List<Widget> children = ProductsRepository.loadProducts(category: category)
.map<Widget>((Product p) => RowItem(product: p))
.toList();
final List<Widget> children =
ProductsRepository.loadProducts(category: category)
.map<Widget>((Product p) => RowItem(product: p))
.toList();
return Scaffold(
backgroundColor: Styles.scaffoldBackground,
body: CustomScrollView(
slivers: <Widget>[
SliverAppBar(
title: Text(getCategoryTitle(category), style: Styles.productListTitle),
title: Text(getCategoryTitle(category),
style: Styles.productListTitle),
backgroundColor: Styles.scaffoldAppBarBackground,
pinned: true,
),

@ -23,8 +23,9 @@ class ProductDetails extends StatelessWidget {
@override
Widget build(BuildContext context) {
final String currentId = GoRouterState.of(context).params['id']!;
final Product product = ProductsRepository.loadProduct(id: int.parse(currentId));
final String currentId = GoRouterState.of(context).pathParameters['id']!;
final Product product =
ProductsRepository.loadProduct(id: int.parse(currentId));
return Scaffold(
body: ListView(
children: <Widget>[
@ -40,7 +41,7 @@ class ProductDetails extends StatelessWidget {
}
}
class ProductPicture extends StatelessWidget{
class ProductPicture extends StatelessWidget {
const ProductPicture({super.key, required this.product});
final Product product;
@ -63,4 +64,4 @@ class ProductPicture extends StatelessWidget{
],
);
}
}
}

@ -24,8 +24,8 @@ class ProductList extends StatelessWidget {
@override
Widget build(BuildContext context) {
final List<Widget> children = ProductsRepository.loadProducts()
.map<Widget>((Product p) => RowItem(product: p))
.toList();
.map<Widget>((Product p) => RowItem(product: p))
.toList();
return Scaffold(
backgroundColor: Styles.scaffoldBackground,
body: CustomScrollView(

@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: '>=3.0.0-290.0.dev <4.0.0'
sdk: ^3.0.0-0
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
@ -36,7 +36,7 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
shrine_images: ^2.0.2
go_router: ^6.5.5
go_router: ^7.0.0
dev_dependencies:
flutter_test:

@ -4,8 +4,8 @@
# This file should be version controlled.
version:
revision: 9944297138845a94256f1cf37beb88ff9a8e811a
channel: stable
revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
channel: beta
project_type: app
@ -13,17 +13,17 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: linux
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: macos
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: windows
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
# User provided section

@ -86,6 +86,7 @@ set_target_properties(${BINARY_NAME}
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
)
# Generated plugin build rules, which manage building the plugins and adding
# them to the application.
include(flutter/generated_plugins.cmake)

@ -31,6 +31,9 @@ target 'Runner' do
use_modular_headers!
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|

@ -21,15 +21,24 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
1120EA12C5B4E281727AA5C3 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 184688219B42823F3E16539A /* Pods_Runner.framework */; };
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
884B81062E7559792AA7D3B1 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECEDBFBE73739914BC5F1C68 /* Pods_Runner.framework */; };
DA83297B084CEE5DB3EB5072 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABC342DBC7C6317FECF86A5 /* Pods_RunnerTests.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 33CC10EC2044A3C60003C045;
remoteInfo = Runner;
};
33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
@ -53,6 +62,10 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
13F0F1C82CB6932FD582845B /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
184688219B42823F3E16539A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
33CC10ED2044A3C60003C045 /* desktop_photo_search.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = desktop_photo_search.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -67,35 +80,42 @@
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
3B16A1750997F6505926E464 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
6C4C89178198C28EEAE6F7B3 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
7F445868482FE8C7E490C0B2 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
B6AE42105CA3AF465302536C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
ECEDBFBE73739914BC5F1C68 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F0AA862A6E953C2BCFB6AF88 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
B1565DAA147CB7F1A067E341 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
BEC764A6DF622F47815F9C96 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
E3FE4499852AA6F62B72D448 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
FABC342DBC7C6317FECF86A5 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
331C80D2294CF70F00263BE5 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DA83297B084CEE5DB3EB5072 /* Pods_RunnerTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
33CC10EA2044A3C60003C045 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
884B81062E7559792AA7D3B1 /* Pods_Runner.framework in Frameworks */,
1120EA12C5B4E281727AA5C3 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
26BACD4DA88B997B095184E2 /* Pods */ = {
331C80D6294CF71000263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
B6AE42105CA3AF465302536C /* Pods-Runner.debug.xcconfig */,
3B16A1750997F6505926E464 /* Pods-Runner.release.xcconfig */,
F0AA862A6E953C2BCFB6AF88 /* Pods-Runner.profile.xcconfig */,
331C80D7294CF71000263BE5 /* RunnerTests.swift */,
);
name = Pods;
path = Pods;
path = RunnerTests;
sourceTree = "<group>";
};
33BA886A226E78AF003329D5 /* Configs */ = {
@ -114,9 +134,10 @@
children = (
33FAB671232836740065AC1E /* Runner */,
33CEB47122A05771004F2AC0 /* Flutter */,
331C80D6294CF71000263BE5 /* RunnerTests */,
33CC10EE2044A3C60003C045 /* Products */,
D73912EC22F37F3D000D13A0 /* Frameworks */,
26BACD4DA88B997B095184E2 /* Pods */,
BC401BB5BECB8BC100CB0159 /* Pods */,
);
sourceTree = "<group>";
};
@ -124,6 +145,7 @@
isa = PBXGroup;
children = (
33CC10ED2044A3C60003C045 /* desktop_photo_search.app */,
331C80D5294CF71000263BE5 /* RunnerTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@ -163,10 +185,25 @@
path = Runner;
sourceTree = "<group>";
};
BC401BB5BECB8BC100CB0159 /* Pods */ = {
isa = PBXGroup;
children = (
6C4C89178198C28EEAE6F7B3 /* Pods-Runner.debug.xcconfig */,
BEC764A6DF622F47815F9C96 /* Pods-Runner.release.xcconfig */,
13F0F1C82CB6932FD582845B /* Pods-Runner.profile.xcconfig */,
B1565DAA147CB7F1A067E341 /* Pods-RunnerTests.debug.xcconfig */,
7F445868482FE8C7E490C0B2 /* Pods-RunnerTests.release.xcconfig */,
E3FE4499852AA6F62B72D448 /* Pods-RunnerTests.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
isa = PBXGroup;
children = (
ECEDBFBE73739914BC5F1C68 /* Pods_Runner.framework */,
184688219B42823F3E16539A /* Pods_Runner.framework */,
FABC342DBC7C6317FECF86A5 /* Pods_RunnerTests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@ -174,17 +211,36 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
331C80D4294CF70F00263BE5 /* RunnerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
066BAEB0DCDFBCEC6CEC149B /* [CP] Check Pods Manifest.lock */,
331C80D1294CF70F00263BE5 /* Sources */,
331C80D2294CF70F00263BE5 /* Frameworks */,
331C80D3294CF70F00263BE5 /* Resources */,
);
buildRules = (
);
dependencies = (
331C80DA294CF71000263BE5 /* PBXTargetDependency */,
);
name = RunnerTests;
productName = RunnerTests;
productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
33CC10EC2044A3C60003C045 /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
63BD7651756B53824E56977F /* [CP] Check Pods Manifest.lock */,
B1EDFDA99E66A6135B314ED1 /* [CP] Check Pods Manifest.lock */,
33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
956D466621879AB65441ECEC /* [CP] Embed Pods Frameworks */,
06032FBBF962FC5F40EDA7D2 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@ -206,6 +262,10 @@
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C80D4294CF70F00263BE5 = {
CreatedOnToolsVersion = 14.0;
TestTargetID = 33CC10EC2044A3C60003C045;
};
33CC10EC2044A3C60003C045 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1100;
@ -236,12 +296,20 @@
projectRoot = "";
targets = (
33CC10EC2044A3C60003C045 /* Runner */,
331C80D4294CF70F00263BE5 /* RunnerTests */,
33CC111A2044C6BA0003C045 /* Flutter Assemble */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
331C80D3294CF70F00263BE5 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
33CC10EB2044A3C60003C045 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@ -254,6 +322,45 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
06032FBBF962FC5F40EDA7D2 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
066BAEB0DCDFBCEC6CEC149B /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@ -292,7 +399,7 @@
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
63BD7651756B53824E56977F /* [CP] Check Pods Manifest.lock */ = {
B1EDFDA99E66A6135B314ED1 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@ -314,26 +421,17 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
956D466621879AB65441ECEC /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
331C80D1294CF70F00263BE5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
33CC10E92044A3C60003C045 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -347,6 +445,11 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
331C80DA294CF71000263BE5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 33CC10EC2044A3C60003C045 /* Runner */;
targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */;
};
33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
@ -367,6 +470,51 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
331C80DB294CF71000263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B1565DAA147CB7F1A067E341 /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.desktopPhotoSearch.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/desktop_photo_search.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/desktop_photo_search";
};
name = Debug;
};
331C80DC294CF71000263BE5 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7F445868482FE8C7E490C0B2 /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.desktopPhotoSearch.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/desktop_photo_search.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/desktop_photo_search";
};
name = Release;
};
331C80DD294CF71000263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = E3FE4499852AA6F62B72D448 /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.desktopPhotoSearch.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/desktop_photo_search.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/desktop_photo_search";
};
name = Profile;
};
338D0CE9231458BD00FA5F75 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
@ -597,6 +745,16 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
331C80DB294CF71000263BE5 /* Debug */,
331C80DC294CF71000263BE5 /* Release */,
331C80DD294CF71000263BE5 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (

@ -37,6 +37,17 @@
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "331C80D4294CF70F00263BE5"
BuildableName = "RunnerTests.xctest"
BlueprintName = "RunnerTests"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction

@ -3,7 +3,7 @@ import FlutterMacOS
class MainFlutterWindow: NSWindow {
override func awakeFromNib() {
let flutterViewController = FlutterViewController.init()
let flutterViewController = FlutterViewController()
let windowFrame = self.frame
self.contentViewController = flutterViewController
self.setFrame(windowFrame, display: true)

@ -0,0 +1,12 @@
import FlutterMacOS
import Cocoa
import XCTest
class RunnerTests: XCTestCase {
func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}
}

@ -4,7 +4,7 @@ publish_to: 'none'
version: 1.0.0+1
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
built_collection: ^5.1.1

@ -52,6 +52,7 @@ add_subdirectory(${FLUTTER_MANAGED_DIR})
# Application build; see runner/CMakeLists.txt.
add_subdirectory("runner")
# Generated plugin build rules, which manage building the plugins and adding
# them to the application.
include(flutter/generated_plugins.cmake)

@ -47,16 +47,17 @@ std::string Utf8FromUtf16(const wchar_t* utf16_string) {
}
int target_length = ::WideCharToMultiByte(
CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
-1, nullptr, 0, nullptr, nullptr);
-1, nullptr, 0, nullptr, nullptr)
-1; // remove the trailing null character
int input_length = (int)wcslen(utf16_string);
std::string utf8_string;
if (target_length == 0 || target_length > utf8_string.max_size()) {
if (target_length <= 0 || target_length > utf8_string.max_size()) {
return utf8_string;
}
utf8_string.resize(target_length);
int converted_length = ::WideCharToMultiByte(
CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
-1, utf8_string.data(),
target_length, nullptr, nullptr);
input_length, utf8_string.data(), target_length, nullptr, nullptr);
if (converted_length == 0) {
return std::string();
}

@ -60,7 +60,7 @@ class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registar instance.
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();

@ -77,7 +77,7 @@ class Win32Window {
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responsponds to changes in DPI. All other messages are handled by
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,

@ -4,8 +4,8 @@
# This file should be version controlled.
version:
revision: 9944297138845a94256f1cf37beb88ff9a8e811a
channel: stable
revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
channel: beta
project_type: app
@ -13,17 +13,17 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: linux
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: macos
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
- platform: windows
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
create_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
base_revision: d11aff97d2df15a076d285f6ad18da75c0d75ddd
# User provided section

@ -86,6 +86,7 @@ set_target_properties(${BINARY_NAME}
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
)
# Generated plugin build rules, which manage building the plugins and adding
# them to the application.
include(flutter/generated_plugins.cmake)

@ -31,6 +31,9 @@ target 'Runner' do
use_modular_headers!
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|

@ -21,15 +21,24 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
9F7D62A917ECA7A2ACE3503B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CBF89B6EF16C4B13A22DEF1 /* Pods_Runner.framework */; };
821E59A743EE736417034058 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5FCD87E149725EC23F2B587 /* Pods_RunnerTests.framework */; };
BA8C9BFE10106A019790C49C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 982F2A71589D14C7A9E78D4C /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 33CC10EC2044A3C60003C045;
remoteInfo = Runner;
};
33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
@ -53,6 +62,9 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
04A5BBBE6311239332C0C5DE /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
33CC10ED2044A3C60003C045 /* desktop_photo_search.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = desktop_photo_search.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -67,26 +79,59 @@
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
470F25786EA14052F3F8470C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
49DBA8D11417C3EAB5A705DB /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
5CBF89B6EF16C4B13A22DEF1 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
76EE8CC6E50E746426B290F0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
5679289B894DB4185ADF6781 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
83D65C1CD58AAA30FCC5C07E /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
982F2A71589D14C7A9E78D4C /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9AEB8B98BCB0767A8753D9A9 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
D23231A6AC192F3F97F903FB /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
D5FCD87E149725EC23F2B587 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
EC5BAB18226565A234FB6E4C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
331C80D2294CF70F00263BE5 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
821E59A743EE736417034058 /* Pods_RunnerTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
33CC10EA2044A3C60003C045 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9F7D62A917ECA7A2ACE3503B /* Pods_Runner.framework in Frameworks */,
BA8C9BFE10106A019790C49C /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
254FD8A3C4E896025A38FDF6 /* Pods */ = {
isa = PBXGroup;
children = (
D23231A6AC192F3F97F903FB /* Pods-Runner.debug.xcconfig */,
04A5BBBE6311239332C0C5DE /* Pods-Runner.release.xcconfig */,
EC5BAB18226565A234FB6E4C /* Pods-Runner.profile.xcconfig */,
83D65C1CD58AAA30FCC5C07E /* Pods-RunnerTests.debug.xcconfig */,
5679289B894DB4185ADF6781 /* Pods-RunnerTests.release.xcconfig */,
9AEB8B98BCB0767A8753D9A9 /* Pods-RunnerTests.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
331C80D6294CF71000263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
331C80D7294CF71000263BE5 /* RunnerTests.swift */,
);
path = RunnerTests;
sourceTree = "<group>";
};
33BA886A226E78AF003329D5 /* Configs */ = {
isa = PBXGroup;
children = (
@ -103,9 +148,10 @@
children = (
33FAB671232836740065AC1E /* Runner */,
33CEB47122A05771004F2AC0 /* Flutter */,
331C80D6294CF71000263BE5 /* RunnerTests */,
33CC10EE2044A3C60003C045 /* Products */,
D73912EC22F37F3D000D13A0 /* Frameworks */,
6B7BDB3F8509434824A6FAFD /* Pods */,
254FD8A3C4E896025A38FDF6 /* Pods */,
);
sourceTree = "<group>";
};
@ -113,6 +159,7 @@
isa = PBXGroup;
children = (
33CC10ED2044A3C60003C045 /* desktop_photo_search.app */,
331C80D5294CF71000263BE5 /* RunnerTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@ -152,21 +199,11 @@
path = Runner;
sourceTree = "<group>";
};
6B7BDB3F8509434824A6FAFD /* Pods */ = {
isa = PBXGroup;
children = (
470F25786EA14052F3F8470C /* Pods-Runner.debug.xcconfig */,
49DBA8D11417C3EAB5A705DB /* Pods-Runner.release.xcconfig */,
76EE8CC6E50E746426B290F0 /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
isa = PBXGroup;
children = (
5CBF89B6EF16C4B13A22DEF1 /* Pods_Runner.framework */,
982F2A71589D14C7A9E78D4C /* Pods_Runner.framework */,
D5FCD87E149725EC23F2B587 /* Pods_RunnerTests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@ -174,17 +211,36 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
331C80D4294CF70F00263BE5 /* RunnerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
D329E6103B26EAD767EE6D88 /* [CP] Check Pods Manifest.lock */,
331C80D1294CF70F00263BE5 /* Sources */,
331C80D2294CF70F00263BE5 /* Frameworks */,
331C80D3294CF70F00263BE5 /* Resources */,
);
buildRules = (
);
dependencies = (
331C80DA294CF71000263BE5 /* PBXTargetDependency */,
);
name = RunnerTests;
productName = RunnerTests;
productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
33CC10EC2044A3C60003C045 /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
AFB46DF2FE3D2BE52A9E3F6D /* [CP] Check Pods Manifest.lock */,
DCB1635F341B00583543F123 /* [CP] Check Pods Manifest.lock */,
33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
4F6658E948682D502AA1F364 /* [CP] Embed Pods Frameworks */,
0FEBEB3BF8ACF361CF91C082 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@ -206,6 +262,10 @@
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C80D4294CF70F00263BE5 = {
CreatedOnToolsVersion = 14.0;
TestTargetID = 33CC10EC2044A3C60003C045;
};
33CC10EC2044A3C60003C045 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1100;
@ -236,12 +296,20 @@
projectRoot = "";
targets = (
33CC10EC2044A3C60003C045 /* Runner */,
331C80D4294CF70F00263BE5 /* RunnerTests */,
33CC111A2044C6BA0003C045 /* Flutter Assemble */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
331C80D3294CF70F00263BE5 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
33CC10EB2044A3C60003C045 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@ -254,6 +322,23 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
0FEBEB3BF8ACF361CF91C082 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@ -292,24 +377,29 @@
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
4F6658E948682D502AA1F364 /* [CP] Embed Pods Frameworks */ = {
D329E6103B26EAD767EE6D88 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
AFB46DF2FE3D2BE52A9E3F6D /* [CP] Check Pods Manifest.lock */ = {
DCB1635F341B00583543F123 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@ -334,6 +424,14 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
331C80D1294CF70F00263BE5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
33CC10E92044A3C60003C045 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -347,6 +445,11 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
331C80DA294CF71000263BE5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 33CC10EC2044A3C60003C045 /* Runner */;
targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */;
};
33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
@ -367,6 +470,51 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
331C80DB294CF71000263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 83D65C1CD58AAA30FCC5C07E /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.desktopPhotoSearch.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/desktop_photo_search.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/desktop_photo_search";
};
name = Debug;
};
331C80DC294CF71000263BE5 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 5679289B894DB4185ADF6781 /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.desktopPhotoSearch.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/desktop_photo_search.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/desktop_photo_search";
};
name = Release;
};
331C80DD294CF71000263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9AEB8B98BCB0767A8753D9A9 /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.desktopPhotoSearch.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/desktop_photo_search.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/desktop_photo_search";
};
name = Profile;
};
338D0CE9231458BD00FA5F75 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
@ -597,6 +745,16 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
331C80DB294CF71000263BE5 /* Debug */,
331C80DC294CF71000263BE5 /* Release */,
331C80DD294CF71000263BE5 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (

@ -37,6 +37,17 @@
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "331C80D4294CF70F00263BE5"
BuildableName = "RunnerTests.xctest"
BlueprintName = "RunnerTests"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction

@ -3,7 +3,7 @@ import FlutterMacOS
class MainFlutterWindow: NSWindow {
override func awakeFromNib() {
let flutterViewController = FlutterViewController.init()
let flutterViewController = FlutterViewController()
let windowFrame = self.frame
self.contentViewController = flutterViewController
self.setFrame(windowFrame, display: true)

@ -0,0 +1,12 @@
import FlutterMacOS
import Cocoa
import XCTest
class RunnerTests: XCTestCase {
func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}
}

@ -4,7 +4,7 @@ publish_to: 'none'
version: 1.0.0+1
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
built_collection: ^5.1.1

@ -52,6 +52,7 @@ add_subdirectory(${FLUTTER_MANAGED_DIR})
# Application build; see runner/CMakeLists.txt.
add_subdirectory("runner")
# Generated plugin build rules, which manage building the plugins and adding
# them to the application.
include(flutter/generated_plugins.cmake)

@ -47,16 +47,17 @@ std::string Utf8FromUtf16(const wchar_t* utf16_string) {
}
int target_length = ::WideCharToMultiByte(
CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
-1, nullptr, 0, nullptr, nullptr);
-1, nullptr, 0, nullptr, nullptr)
-1; // remove the trailing null character
int input_length = (int)wcslen(utf16_string);
std::string utf8_string;
if (target_length == 0 || target_length > utf8_string.max_size()) {
if (target_length <= 0 || target_length > utf8_string.max_size()) {
return utf8_string;
}
utf8_string.resize(target_length);
int converted_length = ::WideCharToMultiByte(
CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
-1, utf8_string.data(),
target_length, nullptr, nullptr);
input_length, utf8_string.data(), target_length, nullptr, nullptr);
if (converted_length == 0) {
return std::string();
}

@ -60,7 +60,7 @@ class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registar instance.
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();

@ -77,7 +77,7 @@ class Win32Window {
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responsponds to changes in DPI. All other messages are handled by
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,

@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions

@ -38,22 +38,18 @@ void main() {
case TargetPlatform.iOS:
expect(find.byType(CupertinoTextSelectionToolbarButton), findsNothing);
expect(find.byType(CupertinoButton), findsNWidgets(2));
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoButton), findsNWidgets(2));
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
findsNothing);
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(CupertinoButton), findsNWidgets(1));
expect(find.byType(TextSelectionToolbarTextButton), findsNothing);
break;
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(find.byType(CupertinoButton), findsNWidgets(1));
expect(find.byType(DesktopTextSelectionToolbarButton), findsNothing);
break;
}
});
}

@ -38,20 +38,16 @@ void main() {
case TargetPlatform.iOS:
expect(
find.byType(CupertinoTextSelectionToolbarButton), findsNWidgets(2));
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
findsNWidgets(2));
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(TextSelectionToolbarTextButton), findsNWidgets(1));
break;
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(
find.byType(DesktopTextSelectionToolbarButton), findsNWidgets(1));
break;
}
});
}

@ -45,20 +45,16 @@ void main() {
case TargetPlatform.iOS:
expect(
find.byType(CupertinoTextSelectionToolbarButton), findsNWidgets(2));
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
findsNWidgets(2));
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(TextSelectionToolbarTextButton), findsNWidgets(1));
break;
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(
find.byType(DesktopTextSelectionToolbarButton), findsNWidgets(1));
break;
}
// Tap the next field to hide the context menu.

@ -51,20 +51,16 @@ void main() {
case TargetPlatform.iOS:
expect(
find.byType(CupertinoTextSelectionToolbarButton), findsNWidgets(2));
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
findsNWidgets(2));
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(TextSelectionToolbarTextButton), findsNWidgets(3));
break;
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(
find.byType(DesktopTextSelectionToolbarButton), findsNWidgets(3));
break;
}
// Click on "Copy" to hide the context menu.
@ -99,20 +95,16 @@ void main() {
case TargetPlatform.iOS:
expect(
find.byType(CupertinoTextSelectionToolbarButton), findsNWidgets(3));
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
findsNWidgets(3));
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(TextSelectionToolbarTextButton), findsNWidgets(4));
break;
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(
find.byType(DesktopTextSelectionToolbarButton), findsNWidgets(4));
break;
}
});
}

@ -45,19 +45,15 @@ void main() {
switch (defaultTargetPlatform) {
case TargetPlatform.iOS:
expect(find.byType(CupertinoTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.android:
expect(find.byType(TextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(find.byType(DesktopTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbar),
findsOneWidget);
break;
}
// Tap the next field to hide the context menu.
@ -84,13 +80,11 @@ void main() {
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(CupertinoTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.macOS:
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(find.byType(CupertinoDesktopTextSelectionToolbar),
findsOneWidget);
break;
}
// Tap the next field to hide the context menu.
@ -114,19 +108,15 @@ void main() {
switch (defaultTargetPlatform) {
case TargetPlatform.iOS:
expect(find.byType(CupertinoTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.android:
expect(find.byType(TextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(find.byType(DesktopTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbar),
findsOneWidget);
break;
}
// Tap the next field to hide the context menu.
@ -171,19 +161,15 @@ void main() {
switch (defaultTargetPlatform) {
case TargetPlatform.iOS:
expect(find.byType(CupertinoTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.android:
expect(find.byType(TextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(find.byType(DesktopTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbar),
findsOneWidget);
break;
}
},
variant: TargetPlatformVariant.all(),

@ -1,48 +0,0 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
# Keeping the repo
.metadata
pubspec.lock
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

@ -1,25 +0,0 @@
# element_embedding_demo
This package contains the application used to demonstrate the
upcoming Flutter web feature: "Element Embedding".
This was first shown on the Flutter Forward event in Nairobi (Kenya), by Tim
Sneath. [See the replay here](https://www.youtube.com/watch?v=zKQYGKAe5W8&t=5799s).
## Running the demo
The demo is a Flutter web app, so it can be run as:
```terminal
$ flutter run -d chrome
```
## Points of Interest
* Check the new JS Interop:
* Look at `lib/main.dart`, find the `@js.JSExport()` annotation.
* Find the JS code that interacts with Dart in `web/js/demo-js-interop.js`.
* See how the Flutter web application is embedded into the page now:
* Find `hostElement` in `web/index.html`.
_(Built by @ditman, @kevmoo and @malloc-error)_

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 KiB

@ -1,335 +0,0 @@
// ignore_for_file: avoid_web_libraries_in_flutter
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:js/js.dart' as js;
import 'package:js/js_util.dart' as js_util;
void main() {
runApp(const MyApp());
}
enum DemoScreen { counter, textField, custom }
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
@js.JSExport()
class _MyAppState extends State<MyApp> {
final _streamController = StreamController<void>.broadcast();
DemoScreen _currentDemoScreen = DemoScreen.counter;
int _counterScreenCount = 0;
@override
void initState() {
super.initState();
final export = js_util.createDartExport(this);
js_util.setProperty(js_util.globalThis, '_appState', export);
js_util.callMethod<void>(js_util.globalThis, '_stateSet', []);
}
@override
void dispose() {
_streamController.close();
super.dispose();
}
@js.JSExport()
void increment() {
if (_currentDemoScreen == DemoScreen.counter) {
setState(() {
_counterScreenCount++;
_streamController.add(null);
});
}
}
@js.JSExport()
void addHandler(void Function() handler) {
_streamController.stream.listen((event) {
handler();
});
}
@js.JSExport()
int get count => _counterScreenCount;
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Element embedding',
theme: ThemeData(
primarySwatch: Colors.blue,
),
debugShowCheckedModeBanner: false,
home: demoScreenRouter(_currentDemoScreen),
);
}
Widget demoScreenRouter(DemoScreen which) {
switch (which) {
case DemoScreen.counter:
return CounterDemo(
title: 'Counter',
numToDisplay: _counterScreenCount,
incrementHandler: increment,
);
case DemoScreen.textField:
return const TextFieldDemo(title: 'Note to Self');
case DemoScreen.custom:
return const CustomDemo(title: 'Character Counter');
}
}
@js.JSExport()
void changeDemoScreenTo(String screenString) {
setState(() {
switch (screenString) {
case 'counter':
_currentDemoScreen = DemoScreen.counter;
break;
case 'textField':
_currentDemoScreen = DemoScreen.textField;
break;
case 'custom':
_currentDemoScreen = DemoScreen.custom;
break;
default:
_currentDemoScreen = DemoScreen.counter;
break;
}
});
}
}
class CounterDemo extends StatefulWidget {
final String title;
final int numToDisplay;
final VoidCallback incrementHandler;
const CounterDemo({
super.key,
required this.title,
required this.numToDisplay,
required this.incrementHandler,
});
@override
State<CounterDemo> createState() => _CounterDemoState();
}
class _CounterDemoState extends State<CounterDemo> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'${widget.numToDisplay}',
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: widget.incrementHandler,
tooltip: 'Increment',
child: const Icon(Icons.add),
),
);
}
}
class TextFieldDemo extends StatelessWidget {
const TextFieldDemo({super.key, required this.title});
final String title;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(title),
),
body: const Center(
child: Padding(
padding: EdgeInsets.all(14.0),
child: TextField(
maxLines: null,
decoration: InputDecoration(
border: OutlineInputBorder(),
// hintText: 'Text goes here!',
),
),
),
),
);
}
}
class CustomDemo extends StatefulWidget {
final String title;
const CustomDemo({super.key, required this.title});
@override
State<CustomDemo> createState() => _CustomDemoState();
}
class _CustomDemoState extends State<CustomDemo> {
final double textFieldHeight = 80;
final Color colorPrimary = const Color(0xff027dfd);
// const Color(0xffd43324);
// const Color(0xff6200ee);
// const Color.fromARGB(255, 255, 82, 44);
final TextEditingController _textController = TextEditingController();
late FocusNode textFocusNode;
int totalCharCount = 0;
@override
void initState() {
super.initState();
textFocusNode = FocusNode();
textFocusNode.requestFocus();
}
@override
void dispose() {
_textController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
toolbarHeight: MediaQuery.of(context).size.height - textFieldHeight,
flexibleSpace: Container(
color: colorPrimary,
height: MediaQuery.of(context).size.height - textFieldHeight,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
'COUNT WITH DASH!',
style: TextStyle(color: Colors.white, fontSize: 18),
),
const SizedBox(
height: 26,
),
Container(
width: 98,
height: 98,
decoration: BoxDecoration(
border: Border.all(width: 2, color: Colors.white),
shape: BoxShape.circle,
),
child: Center(
child: Container(
width: 90,
height: 90,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/dash.png'),
fit: BoxFit.cover,
),
color: Colors.white,
shape: BoxShape.circle,
),
),
),
),
const SizedBox(height: 20),
Text(
totalCharCount.toString(),
style: const TextStyle(color: Colors.white, fontSize: 52),
),
// const Text(
// 'characters typed',
// style: TextStyle(color: Colors.white, fontSize: 14),
// ),
],
),
),
),
body: Column(
children: [
SizedBox(
height: textFieldHeight,
child: Center(
child: Padding(
padding: const EdgeInsets.only(left: 18, right: 18),
child: Row(
children: [
Expanded(
child: TextField(
controller: _textController,
focusNode: textFocusNode,
onSubmitted: (value) {
textFocusNode.requestFocus();
},
onChanged: (value) {
handleChange();
},
maxLines: 1,
decoration: const InputDecoration(
border: OutlineInputBorder(),
),
),
),
const SizedBox(
width: 12,
),
Center(
child: Container(
width: 42,
height: 42,
decoration: BoxDecoration(
color: colorPrimary,
shape: BoxShape.circle,
),
child: IconButton(
icon: const Icon(Icons.refresh),
color: Colors.white,
onPressed: () {
handleClear();
},
),
),
),
],
),
),
),
),
],
),
);
}
void handleChange() {
setState(() {
totalCharCount = _textController.value.text.toString().length;
});
}
void handleClear() {
setState(() {
_textController.clear();
totalCharCount = 0;
});
textFocusNode.requestFocus();
}
}

@ -1,23 +0,0 @@
name: element_embedding_demo
description: A small app to be embedded into a HTML element (see web/index.html)
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: '>=3.0.0-0 <4.0.0'
dependencies:
cupertino_icons: ^1.0.2
flutter:
sdk: flutter
js: ^0.6.6
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter:
uses-material-design: true
assets:
- assets/dash.png

@ -1,260 +0,0 @@
@font-face {
font-family: "DM Sans";
src: url(../fonts/DMSans-Regular.ttf);
font-weight: normal;
}
@font-face {
font-family: "DM Sans";
src: url(../fonts/DMSans-Bold.ttf);
font-weight: 700;
}
/** Reset */
* {
box-sizing: border-box;
font-family: "DM Sans", sans-serif;
}
html, body {
margin: 0;
padding: 0;
min-height: 100vh;
}
body {
background-color: #fff;
background-image: radial-gradient(
ellipse at bottom,
#fafafa 5%,
transparent 60%
),
linear-gradient(136deg, transparent, #eee 290%),
linear-gradient(115deg, #fafafa, transparent 40%),
linear-gradient(180deg, transparent 0, #ddd 70%),
radial-gradient(ellipse at -70% -180%, transparent 80%, #eee 0),
radial-gradient(ellipse at bottom, #71c7ee 40%, transparent 80%),
radial-gradient(ellipse at 5% 340%, transparent 80%, #ddd 0);
background-repeat: no-repeat;
color: #555;
}
/** Layout **/
body { display: flex; flex-direction: column; }
section.contents {
flex: 1 1 auto;
flex-direction: row;
display: flex;
}
section.contents aside {
flex: 0;
display: flex;
flex-direction: column;
order: -1;
}
section.contents aside fieldset {
display: flex;
flex-flow: wrap;
justify-content: space-between;
align-items: flex-end;
}
section.contents aside .align-top {
align-self: flex-start;
}
section.contents article {
flex: 1;
margin-top: 50px;
display: flex;
justify-content: center;
}
/** Title */
h1 {
font-weight: 700;
font-size: 48px;
padding: 0;
line-height: .9em;
letter-spacing: -2px;
margin: 0 0 30px 0;
}
/** Controls for the demo (left column) */
#demo_controls {
background: linear-gradient(90deg, rgba(255,255,255,1) 10%, rgba(255,255,255,0) 100%);
padding: 40px 20px 0px 20px;
z-index: 10;
}
#demo_controls fieldset {
padding: 0;
border: none;
width: 210px;
}
#demo_controls legend {
text-align: center;
font-size: 20px;
line-height: 40px;
margin-bottom: 3px;
}
#demo_controls select.screen {
display: block;
width: 120px;
padding: 4px;
text-align: center;
margin-bottom: 10px;
}
#demo_controls input {
display: block;
width: 100px;
margin: 0 0 10px 0;
text-align: center;
}
/** Keep controls that */
#demo_controls .tight input {
margin: 0px;
}
#demo_controls input[type="button"] {
line-height: 10px;
font-size: 14px;
border-radius: 15px;
border: 1px solid #aaa;
border-style: outset;
background-color: #fff;
height: 30px;
color: #555;
transition: all 100ms ease-in-out;
cursor: pointer;
}
#demo_controls input[type="button"]:hover {
/* .active:hover background-color: #96B6E3;*/
border-color: #1c68d4;
background-color: #1c68d4;
color: white;
}
#demo_controls input[type="button"].active {
border-color: #1c68d4;
background-color: #1c68d4;
color: white;
}
#demo_controls input#value {
font-size: 32px;
line-height: 1em;
min-height: 30px;
color: #888;
}
#demo_controls input#increment {
/* Center vertically next to taller input#value */
position: relative;
top: -6px;
}
#demo_controls .disabled {
pointer-events: none;
opacity: .5;
}
/** The style for the DIV where flutter will be rendered, and the CSS fx */
#flutter_target {
border: 1px solid #aaa;
width: 320px;
height: 480px;
border-radius: 0px;
transition: all 150ms ease-in;
}
#flutter_target.resize {
width: 480px;
height: 320px;
}
#flutter_target.spin { animation: spin 6400ms ease-in-out infinite; }
#flutter_target.shadow { position: relative; }
#flutter_target.shadow::before {
content: "";
position: absolute;
display: block;
width: 100%;
top: calc(100% - 1px);
left: 0;
height: 1px;
background-color: black;
border-radius: 50%;
z-index: -1;
transform: rotateX(80deg);
box-shadow: 0px 0px 60px 38px rgb(0 0 0 / 25%);
}
#flutter_target.mirror {
-webkit-box-reflect: below 0px linear-gradient(to bottom, rgba(0,0,0,0.0), rgba(0,0,0,0.4));
}
@keyframes spin {
0% {
transform: perspective(1000px) rotateY(0deg);
animation-timing-function: ease-in;
}
15% {
transform: perspective(1000px) rotateY(165deg);
animation-timing-function: linear;
}
75% {
transform: perspective(1000px) rotateY(195deg);
animation-timing-function: linear;
}
90% {
transform: perspective(1000px) rotateY(359deg);
animation-timing-function: ease-out;
}
100% {
transform: perspective(1000px) rotateY(359deg);
animation-timing-function: linear;
}
}
/** "Handheld"/Device mode container */
#handheld::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: url(../icons/unsplash-x9WGMWwp1NM.png) no-repeat;
background-size: 1000px;
background-position: top right;
opacity: 1;
transition: opacity 200ms ease-out;
}
#handheld::after {
content: "";
position: absolute;
display: block;
width: 77px;
height: 67px;
top: 534px;
right: 573px;
background: url(../icons/nail.png) no-repeat;
background-size: 77px;
opacity: 1;
transition: opacity 200ms ease-out;
}
#handheld.hidden::before,
#handheld.hidden::after {
opacity: 0;
}
#flutter_target.handheld {
position: absolute;
right: 0px;
transform-origin: 0px 0px 0px;
transform: rotate(-14.1deg) scale(0.80) translate(-539px, -45px);
width: 316px;
height: 678px;
border-radius: 34px;
border: 1px solid #000;
overflow: hidden;
}
.imageAttribution {
position: absolute;
bottom: 6px;
right: 6px;
font-size: 10px;
}
.imageAttribution, .imageAttribution a { color: #fff; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

@ -1,93 +0,0 @@
Copyright 2014-2017 Indian Type Foundry (info@indiantypefoundry.com). Copyright 2019 Google LLC.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

@ -1,100 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<base href="/" />
<meta charset="UTF-8" />
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />
<meta name="description" content="A Flutter Web Element embedding demo." />
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-title" content="Flutter Element embedding" />
<link rel="apple-touch-icon" href="icons/Icon-192.png" />
<link rel="preload" as="image" href="icons/unsplash-x9WGMWwp1NM.png" />
<!-- Favicon -->
<link rel="icon" type="image/png" href="icons/favicon.png" />
<title>Element embedding</title>
<link rel="manifest" href="manifest.json" />
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<section class="contents">
<article>
<div id="flutter_target"></div>
</article>
<aside id="demo_controls">
<h1>Element embedding</h1>
<fieldset id="fx">
<legend>Effects</legend>
<input value="Shadow" data-fx="shadow" type="button" class="fx" />
<input value="Mirror 🧪" data-fx="mirror" type="button" class="fx" />
<input value="Resize" data-fx="resize" type="button" class="fx align-top" />
<div class="tight">
<input value="Spin" data-fx="spin" type="button" class="fx" />
<input type="range" value="0" min="-180" max="180" list="markers" id="rotation" class="tight" />
<datalist id="markers">
<option value="-180"></option>
<option value="-135"></option>
<option value="-45"></option>
<option value="0"></option>
<option value="45"></option>
<option value="135"></option>
<option value="180"></option>
</datalist>
</div>
<input value="Device" data-fx="handheld" type="button" class="fx" />
</fieldset>
<fieldset id="interop">
<legend>JS Interop</legend>
<label for="screen-selector">
Screen
<select name="screen-select" id="screen-selector" class="screen">
<option value="counter">Counter</option>
<option value="textField">TextField</option>
<option value="custom">Custom App</option>
</select>
</label>
<label for="value">
Value
<input id="value" value="" type="text" readonly />
</label>
<input
id="increment"
value="Increment"
type="button"
/>
</fieldset>
</aside>
</section>
<script>
window.addEventListener("load", function (ev) {
// Embed flutter into div#flutter_target
let target = document.querySelector("#flutter_target");
_flutter.loader.loadEntrypoint({
onEntrypointLoaded: async function (engineInitializer) {
let appRunner = await engineInitializer.initializeEngine({
hostElement: target,
});
await appRunner.runApp();
},
});
});
</script>
<script src="js/demo-js-interop.js" defer></script>
<script src="js/demo-css-fx.js" defer></script>
</body>
</html>

@ -1,82 +0,0 @@
// Manages toggling the VFX of the buttons
(function () {
"use strict";
let handheld;
let fxButtons = document.querySelector("#fx");
let flutterTarget = document.querySelector("#flutter_target");
let attribution = document.createElement("span");
attribution.className = "imageAttribution";
attribution.innerHTML = "Photo by <a href='https://unsplash.com/photos/x9WGMWwp1NM' rel='noopener noreferrer' target='_blank'>Nathana Rebouças</a> on Unsplash";
// (Re)moves the flutterTarget inside a div#handheld.
function handleHandHeld(fx) {
resetRotation();
if (!handheld) {
handheld = document.createElement("div");
handheld.id = "handheld";
handheld.classList.add("hidden");
// Inject before the flutterTarget
flutterTarget.parentNode.insertBefore(handheld, flutterTarget);
handheld.append(flutterTarget);
handheld.append(attribution);
window.setTimeout(function () {
handheld.classList.remove("hidden");
}, 100);
// Disable all effects on the flutter container
flutterTarget.className = "";
setOtherFxEnabled(false);
} else {
handheld.classList.add("hidden");
window.setTimeout(function () {
handheld.parentNode.insertBefore(flutterTarget, handheld);
handheld.remove();
handheld = null;
}, 210);
setOtherFxEnabled(true);
}
window.requestAnimationFrame(function () {
// Let the browser flush the DOM...
flutterTarget.classList.toggle(fx);
});
}
// Sets a rotation style on the flutterTarget (in degrees).
function handleRotation(degrees) {
flutterTarget.style.transform = `perspective(1000px) rotateY(${degrees}deg)`;
}
// Removes the inline style from the flutterTarget.
function resetRotation() {
flutterTarget.style = null;
}
// Enables/disables the buttons that are not compatible with the "handheld" mode.
function setOtherFxEnabled(enabled) {
fxButtons.querySelectorAll('input').forEach((btn) => {
if (btn.dataset.fx != 'handheld') {
btn.classList.toggle('disabled', !enabled);
}
});
}
// Handles clicks on the buttons inside #fx.
fxButtons.addEventListener("click", (event) => {
let fx = event.target.dataset.fx;
if (fx === "handheld") {
handleHandHeld(fx);
return;
}
flutterTarget.classList.toggle(fx);
});
fxButtons.addEventListener("input", (event) => {
if (event.target.id === "rotation") {
flutterTarget.classList.toggle("spin", false);
handleRotation(event.target.value);
}
})
})();

@ -1,43 +0,0 @@
// Sets up a channel to JS-interop with Flutter
(function() {
"use strict";
// This function will be called from Flutter when it prepares the JS-interop.
window._stateSet = function () {
window._stateSet = function () {
console.log("Call _stateSet only once!");
};
// The state of the flutter app, see `class _MyAppState` in lib/main.dart.
let appState = window._appState;
let valueField = document.querySelector("#value");
let updateState = function () {
valueField.value = appState.count;
};
// Register a callback to update the HTML field from Flutter.
appState.addHandler(updateState);
// Render the first value (0).
updateState();
let incrementButton = document.querySelector("#increment");
incrementButton.addEventListener("click", (event) => {
appState.increment();
});
let screenSelector = document.querySelector("#screen-selector");
screenSelector.addEventListener("change", (event) => {
appState.changeDemoScreenTo(event.target.value);
setJsInteropControlsEnabled(event.target.value === 'counter');
});
// Enables/disables the Value/Increment controls.
function setJsInteropControlsEnabled(enabled) {
let elements = document.querySelectorAll("#increment, label[for='value']");
elements.forEach((el) => {
el.classList.toggle('disabled', !enabled);
})
}
};
}());

@ -1,35 +0,0 @@
{
"name": "element_embedding_demo",
"short_name": "element_embedding",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "An example of how to embed a Flutter Web app into any HTML Element of a page.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}

@ -4,7 +4,7 @@ description: Demonstrates how to use the federated_plugin plugin.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
flutter:

@ -5,7 +5,7 @@ version: 0.0.1
publish_to: "none"
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
flutter:

@ -4,7 +4,7 @@ version: 0.0.1
homepage:
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
flutter:

@ -4,7 +4,7 @@ version: 0.0.1
homepage:
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
flutter:

@ -4,7 +4,7 @@ version: 0.0.1
publish_to: none
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
flutter:

@ -4,7 +4,7 @@ version: 0.0.1
homepage:
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
flutter:

@ -110,10 +110,8 @@ class _SavedLintsPageState extends State<SavedLintsPage> {
);
}
break;
case 'Delete':
await profilesStore.deleteProfile(profile);
break;
default:
}
},

@ -331,7 +331,6 @@ class _NavigationRailTrailingSection extends StatelessWidget {
),
],
);
break;
default:
break;
}

@ -6,7 +6,7 @@ version: 1.0.0+1
publish_to: "none"
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
flutter:

@ -37,12 +37,18 @@ enum ColorSeed {
}
enum ColorImageProvider {
leaves('Leaves', 'https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_1.png'),
peonies('Peonies', 'https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_2.png'),
bubbles('Bubbles', 'https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_3.png'),
seaweed('Seaweed', 'https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_4.png'),
seagrapes('Sea Grapes', 'https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_5.png'),
petals('Petals', 'https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_6.png');
leaves('Leaves',
'https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_1.png'),
peonies('Peonies',
'https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_2.png'),
bubbles('Bubbles',
'https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_3.png'),
seaweed('Seaweed',
'https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_4.png'),
seagrapes('Sea Grapes',
'https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_5.png'),
petals('Petals',
'https://flutter.github.io/assets-for-api-docs/assets/material/content_based_color_scheme_6.png');
const ColorImageProvider(this.label, this.url);
final String label;

@ -3,7 +3,6 @@
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'constants.dart';
import 'home.dart';
@ -32,7 +31,7 @@ class _AppState extends State<App> {
bool get useLightMode {
switch (themeMode) {
case ThemeMode.system:
return SchedulerBinding.instance.window.platformBrightness ==
return View.of(context).platformDispatcher.platformBrightness ==
Brightness.light;
case ThemeMode.light:
return true;

@ -8,7 +8,7 @@ publish_to: "none"
version: 1.0.0+1
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
flutter:

@ -15,7 +15,7 @@ void main() {
'Color palettes screen shows correctly when color icon is clicked '
'on NavigationBar', (tester) async {
widgetSetup(tester, 449);
addTearDown(tester.binding.window.clearPhysicalSizeTestValue);
addTearDown(tester.view.resetPhysicalSize);
await tester.pumpWidget(const App());
expect(find.text('Light ColorScheme'), findsNothing);
@ -44,7 +44,7 @@ void main() {
'on NavigationRail', (tester) async {
widgetSetup(
tester, 1200); // NavigationRail shows only when width is > 1000.
addTearDown(tester.binding.window.clearPhysicalSizeTestValue);
addTearDown(tester.view.resetPhysicalSize);
await tester.pumpWidget(const App());
await tester.pumpAndSettle();
expect(find.text('Light ColorScheme'), findsNothing);

@ -37,7 +37,8 @@ void main() {
expect(find.widgetWithText(FloatingActionButton, 'Create'), findsOneWidget);
// Icon buttons
expect(find.widgetWithIcon(IconButton, Icons.settings_outlined), findsNWidgets(8));
expect(find.widgetWithIcon(IconButton, Icons.settings_outlined),
findsNWidgets(8));
// Segmented buttons
expect(find.byType(SegmentedButton<Calendar>), findsOneWidget);
@ -350,8 +351,7 @@ void main() {
void widgetSetup(WidgetTester tester, double windowWidth,
{double? windowHeight}) {
final height = windowHeight ?? 846;
tester.binding.window.devicePixelRatioTestValue = (2);
final dpi = tester.binding.window.devicePixelRatio;
tester.binding.window.physicalSizeTestValue =
Size(windowWidth * dpi, height * dpi);
tester.view.devicePixelRatio = 2;
final dpi = tester.view.devicePixelRatio;
tester.view.physicalSize = Size(windowWidth * dpi, height * dpi);
}

@ -15,7 +15,7 @@ void main() {
'Surface Tones screen shows correctly when the corresponding icon is '
'selected on NavigationBar', (tester) async {
widgetSetup(tester, 449);
addTearDown(tester.binding.window.clearPhysicalSizeTestValue);
addTearDown(tester.view.resetPhysicalSize);
await tester.pumpWidget(const App());
expect(find.text('Surface Tint Color Only'), findsNothing);
@ -40,7 +40,7 @@ void main() {
'selected on NavigationRail', (tester) async {
widgetSetup(
tester, 1200); // NavigationRail shows only when width is > 1000.
addTearDown(tester.binding.window.clearPhysicalSizeTestValue);
addTearDown(tester.view.resetPhysicalSize);
await tester.pumpWidget(const App());
expect(find.text('Surface Tint Color Only'), findsNothing);
Finder tintIconOnRail = find.descendant(

@ -15,7 +15,7 @@ void main() {
'Typography screen shows correctly when the corresponding icon is '
'selected on NavigationBar', (tester) async {
widgetSetup(tester, 449);
addTearDown(tester.binding.window.clearPhysicalSizeTestValue);
addTearDown(tester.view.resetPhysicalSize);
await tester.pumpWidget(const App());
expect(find.text('Display Large'), findsNothing);
@ -39,7 +39,7 @@ void main() {
'selected on NavigationRail', (tester) async {
widgetSetup(
tester, 1200); // NavigationRail shows only when width is > 1000.
addTearDown(tester.binding.window.clearPhysicalSizeTestValue);
addTearDown(tester.view.resetPhysicalSize);
await tester.pumpWidget(const App());
expect(find.text('Display Large'), findsNothing);
Finder textIconOnRail = find.descendant(

@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions

@ -1,15 +1,7 @@
// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
// ignore_for_file: library_private_types_in_public_api
// ignore_for_file: non_constant_identifier_names
// ignore_for_file: camel_case_types
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: void_checks
// ignore_for_file: constant_identifier_names
// ignore_for_file: annotate_overrides
// ignore_for_file: type=lint
import 'dart:ffi' as ffi;
import 'package:ffi/ffi.dart' as pkg_ffi;
@ -26232,13 +26224,13 @@ class NSObject extends _ObjCWrapper {
}
}
class ObjCSel extends ffi.Opaque {}
final class ObjCSel extends ffi.Opaque {}
class ObjCObject extends ffi.Opaque {}
final class ObjCObject extends ffi.Opaque {}
typedef instancetype = ffi.Pointer<ObjCObject>;
class _NSZone extends ffi.Opaque {}
final class _NSZone extends ffi.Opaque {}
class Protocol extends _ObjCWrapper {
Protocol._(ffi.Pointer<ObjCObject> id, PedometerBindings lib,
@ -29348,7 +29340,7 @@ class NSData extends NSObject {
}
}
class _NSRange extends ffi.Struct {
final class _NSRange extends ffi.Struct {
@ffi.UnsignedLong()
external int location;
@ -31659,7 +31651,7 @@ class ObjCBlock extends _ObjCBlockBase {
ffi.Pointer<_ObjCBlock> get pointer => _id;
}
class _ObjCBlockDesc extends ffi.Struct {
final class _ObjCBlockDesc extends ffi.Struct {
@ffi.UnsignedLong()
external int reserved;
@ -31673,7 +31665,7 @@ class _ObjCBlockDesc extends ffi.Struct {
external ffi.Pointer<ffi.Char> signature;
}
class _ObjCBlock extends ffi.Struct {
final class _ObjCBlock extends ffi.Struct {
external ffi.Pointer<ffi.Void> isa;
@ffi.Int()
@ -33120,9 +33112,12 @@ class NSDictionary extends NSObject {
}
static NSDictionary dictionaryWithObject_forKey_(
PedometerBindings _lib, NSObject object, NSObject key) {
final _ret = _lib._objc_msgSend_140(_lib._class_NSDictionary1,
_lib._sel_dictionaryWithObject_forKey_1, object._id, key._id);
PedometerBindings _lib, NSObject object, NSObject? key) {
final _ret = _lib._objc_msgSend_140(
_lib._class_NSDictionary1,
_lib._sel_dictionaryWithObject_forKey_1,
object._id,
key?._id ?? ffi.nullptr);
return NSDictionary._(_ret, _lib, retain: true, release: true);
}
@ -33588,7 +33583,7 @@ class ObjCBlock10 extends _ObjCBlockBase {
ffi.Pointer<_ObjCBlock> get pointer => _id;
}
class NSFastEnumerationState extends ffi.Struct {
final class NSFastEnumerationState extends ffi.Struct {
@ffi.UnsignedLong()
external int state;
@ -39018,9 +39013,9 @@ class NSMutableDictionary extends NSDictionary {
return _lib._objc_msgSend_15(_id, _lib._sel_removeObjectForKey_1, aKey._id);
}
void setObject_forKey_(NSObject anObject, NSObject aKey) {
return _lib._objc_msgSend_460(
_id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id);
void setObject_forKey_(NSObject anObject, NSObject? aKey) {
return _lib._objc_msgSend_460(_id, _lib._sel_setObject_forKey_1,
anObject._id, aKey?._id ?? ffi.nullptr);
}
@override
@ -39061,9 +39056,9 @@ class NSMutableDictionary extends NSDictionary {
_id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr);
}
void setObject_forKeyedSubscript_(NSObject obj, NSObject key) {
return _lib._objc_msgSend_460(
_id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id);
void setObject_forKeyedSubscript_(NSObject obj, NSObject? key) {
return _lib._objc_msgSend_460(_id, _lib._sel_setObject_forKeyedSubscript_1,
obj._id, key?._id ?? ffi.nullptr);
}
static NSMutableDictionary dictionaryWithCapacity_(
@ -39118,9 +39113,12 @@ class NSMutableDictionary extends NSDictionary {
}
static NSMutableDictionary dictionaryWithObject_forKey_(
PedometerBindings _lib, NSObject object, NSObject key) {
final _ret = _lib._objc_msgSend_140(_lib._class_NSMutableDictionary1,
_lib._sel_dictionaryWithObject_forKey_1, object._id, key._id);
PedometerBindings _lib, NSObject object, NSObject? key) {
final _ret = _lib._objc_msgSend_140(
_lib._class_NSMutableDictionary1,
_lib._sel_dictionaryWithObject_forKey_1,
object._id,
key?._id ?? ffi.nullptr);
return NSMutableDictionary._(_ret, _lib, retain: true, release: true);
}
@ -46212,7 +46210,7 @@ class NSScanner extends NSObject {
}
}
class NSDecimal extends ffi.Opaque {}
final class NSDecimal extends ffi.Opaque {}
class NSException extends NSObject {
NSException._(ffi.Pointer<ObjCObject> id, PedometerBindings lib,
@ -46610,7 +46608,7 @@ class NSRunLoop extends NSObject {
}
}
class __CFRunLoop extends ffi.Opaque {}
final class __CFRunLoop extends ffi.Opaque {}
class NSTimer extends NSObject {
NSTimer._(ffi.Pointer<ObjCObject> id, PedometerBindings lib,
@ -51186,7 +51184,7 @@ abstract class NSOperationQueuePriority {
static const int NSOperationQueuePriorityVeryHigh = 8;
}
class dispatch_queue_s extends ffi.Opaque {}
final class dispatch_queue_s extends ffi.Opaque {}
class NSPointerArray extends NSObject {
NSPointerArray._(ffi.Pointer<ObjCObject> id, PedometerBindings lib,
@ -51958,7 +51956,7 @@ class NSProcessInfo extends NSObject {
}
}
class NSOperatingSystemVersion extends ffi.Struct {
final class NSOperatingSystemVersion extends ffi.Struct {
@ffi.Long()
external int majorVersion;
@ -54306,9 +54304,9 @@ abstract class NSURLCredentialPersistence {
static const int NSURLCredentialPersistenceSynchronizable = 3;
}
class __SecIdentity extends ffi.Opaque {}
final class __SecIdentity extends ffi.Opaque {}
class __SecTrust extends ffi.Opaque {}
final class __SecTrust extends ffi.Opaque {}
/// !
/// @class NSURLProtectionSpace

@ -4,7 +4,7 @@ version: 0.0.1
publish_to: "none"
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
flutter: ">=2.11.0"
dependencies:
@ -15,7 +15,7 @@ dependencies:
ffi: ^2.0.1
dev_dependencies:
ffigen: ^7.2.1
ffigen: ^8.0.0
jnigen: ^0.4.0
flutter_test:
sdk: flutter

@ -135,27 +135,22 @@ class WonkyCharState extends State<WonkyChar>
{
_scaleAnimation = animation;
}
break;
case 'rotation':
{
_rotationAnimation = animation;
}
break;
case 'offsetX':
{
_offsetXAnimation = animation;
}
break;
case 'offsetY':
{
_offsetYAnimation = animation;
}
break;
case 'color':
{
_colorAnimation = animation;
}
break;
default:
{
if (kDebugMode) {

@ -4,7 +4,7 @@ publish_to: 'none'
version: 1.0.0+1
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
flutter:

@ -4,7 +4,7 @@ version: 1.0.0+1
publish_to: none
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
dependencies:
charts_flutter: ^0.12.0

@ -74,26 +74,25 @@ class _HomePageState extends State<HomePage> {
body: StreamBuilder<QuerySnapshot>(
stream: _iceCreamStores,
builder: (context, snapshot) {
if (snapshot.hasError) {
return Center(child: Text('Error: ${snapshot.error}'));
}
if (!snapshot.hasData) {
return const Center(child: Text('Loading...'));
}
return Stack(
children: [
StoreMap(
documents: snapshot.data!.docs,
initialPosition: initialPosition,
mapController: _mapController,
),
StoreCarousel(
mapController: _mapController,
documents: snapshot.data!.docs,
),
],
);
return switch (snapshot) {
AsyncSnapshot(hasError: true) =>
Center(child: Text('Error: ${snapshot.error}')),
AsyncSnapshot(hasData: false) =>
const Center(child: Text('Loading...')),
_ => Stack(
children: [
StoreMap(
documents: snapshot.data!.docs,
initialPosition: initialPosition,
mapController: _mapController,
),
StoreCarousel(
mapController: _mapController,
documents: snapshot.data!.docs,
),
],
)
};
},
),
);

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save