├── .DS_Store ├── .gitattributes ├── .github └── workflows │ └── build.yml ├── .gitignore ├── .metadata ├── .vscode └── launch.json ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── flutter_everywhere │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── fonts │ ├── AbrilFatface-Regular.ttf │ ├── GalleryIcons.ttf │ ├── GoogleSans-Regular.ttf │ ├── LibreFranklin-Regular.ttf │ ├── MaterialIcons-Regular.ttf │ ├── Merriweather-Regular.ttf │ ├── Raleway-Regular.ttf │ ├── Roboto │ │ ├── LICENSE.txt │ │ ├── Roboto-Black.ttf │ │ ├── Roboto-Bold.ttf │ │ ├── Roboto-Light.ttf │ │ ├── Roboto-Medium.ttf │ │ ├── Roboto-Regular.ttf │ │ └── Roboto-Thin.ttf │ ├── google_fonts.json │ └── google_fonts │ │ ├── Eczar-Regular.ttf │ │ ├── Eczar-SemiBold.ttf │ │ ├── LibreFranklin-Bold.ttf │ │ ├── LibreFranklin-ExtraBold.ttf │ │ ├── LibreFranklin-Medium.ttf │ │ ├── LibreFranklin-Regular.ttf │ │ ├── LibreFranklin-SemiBold.ttf │ │ ├── Merriweather-BoldItalic.ttf │ │ ├── Merriweather-Light.ttf │ │ ├── Merriweather-Regular.ttf │ │ ├── Montserrat-Bold.ttf │ │ ├── Montserrat-Medium.ttf │ │ ├── Montserrat-Regular.ttf │ │ ├── Montserrat-SemiBold.ttf │ │ ├── Oswald-Medium.ttf │ │ ├── Oswald-SemiBold.ttf │ │ ├── Raleway-Light.ttf │ │ ├── Raleway-Medium.ttf │ │ ├── Raleway-Regular.ttf │ │ ├── Raleway-SemiBold.ttf │ │ ├── RobotoMono-Regular.ttf │ │ ├── Rubik-Bold.ttf │ │ ├── Rubik-Medium.ttf │ │ └── Rubik-Regular.ttf └── images │ └── icon │ ├── get_started128.png │ ├── get_started16.png │ ├── get_started32.png │ └── get_started48.png ├── background.js ├── bin ├── cli │ ├── counter.dart │ └── index.dart ├── main.dart ├── server.dart └── server │ ├── controllers │ ├── counter.dart │ └── index.dart │ ├── response.dart │ └── router.dart ├── counter ├── debug.js ├── docs ├── assets │ ├── AssetManifest.json │ ├── FontManifest.json │ ├── LICENSE │ ├── fonts │ │ └── MaterialIcons-Regular.ttf │ └── packages │ │ └── cupertino_icons │ │ └── assets │ │ └── CupertinoIcons.ttf ├── flutter_service_worker.js ├── icons │ ├── Icon-192.png │ └── Icon-512.png ├── index.html ├── main.dart.js ├── main.dart.js.deps ├── main.dart.js.map └── manifest.json ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── data │ └── models │ │ ├── counter.dart │ │ └── index.dart ├── main.dart └── plugins │ └── desktop │ ├── desktop.dart │ ├── io.dart │ └── unsupported.dart ├── linux ├── .gitignore ├── Makefile ├── app_configuration.mk ├── build.sh ├── flutter │ ├── .template_version │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.mk ├── flutter_embedder_example.cc ├── main.cc ├── name_output.sh ├── window_configuration.cc └── window_configuration.h ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ ├── GeneratedPluginRegistrant.swift │ └── ephemeral │ │ ├── Flutter-Generated.xcconfig │ │ └── flutter_export_environment.sh ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── app_icon_1024.png │ │ ├── app_icon_128.png │ │ ├── app_icon_16.png │ │ ├── app_icon_256.png │ │ ├── app_icon_32.png │ │ ├── app_icon_512.png │ │ └── app_icon_64.png │ ├── Base.lproj │ └── MainMenu.xib │ ├── Configs │ ├── AppInfo.xcconfig │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements ├── manifest.json ├── package-lock.json ├── package.json ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ └── Icon-512.png ├── index.html ├── main.dart ├── main.js ├── manifest.json ├── package.json └── preload.js └── windows ├── .gitignore ├── AppConfiguration.props ├── FlutterBuild.vcxproj ├── Runner.sln ├── Runner.vcxproj ├── Runner.vcxproj.filters ├── flutter ├── .template_version ├── GeneratedPlugins.props ├── generated_plugin_registrant.cc └── generated_plugin_registrant.h ├── runner ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources │ └── app_icon.ico ├── run_loop.cpp ├── run_loop.h ├── runner.exe.manifest ├── win32_window.cpp ├── win32_window.h ├── window_configuration.cpp └── window_configuration.h └── scripts ├── bundle_assets_and_deps.bat └── prepare_dependencies.bat /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build/release 2 | 3 | on: push 4 | 5 | jobs: 6 | release: 7 | runs-on: ${{ matrix.os }} 8 | 9 | strategy: 10 | matrix: 11 | os: [macos-latest, ubuntu-latest, windows-latest] 12 | 13 | steps: 14 | - name: Check out Git repository 15 | uses: actions/checkout@v1 16 | 17 | - name: Install Node.js, NPM and Yarn 18 | uses: actions/setup-node@v1 19 | with: 20 | node-version: 10 21 | 22 | - name: Build/release Electron app 23 | uses: samuelmeuli/action-electron-builder@v1 24 | with: 25 | # GitHub token, automatically provided to the action 26 | # (No need to define this secret in the repo settings) 27 | github_token: ${{ secrets.github_token }} 28 | 29 | # If the commit is tagged with a version (e.g. "v1.0.0"), 30 | # release the app after building 31 | release: ${{ startsWith(github.ref, 'refs/tags/v') }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | # .vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | /node_modules/ 33 | 34 | # Android related 35 | **/android/**/gradle-wrapper.jar 36 | **/android/.gradle 37 | **/android/captures/ 38 | **/android/gradlew 39 | **/android/gradlew.bat 40 | **/android/local.properties 41 | **/android/**/GeneratedPluginRegistrant.java 42 | 43 | # iOS/XCode related 44 | **/ios/**/*.mode1v3 45 | **/ios/**/*.mode2v3 46 | **/ios/**/*.moved-aside 47 | **/ios/**/*.pbxuser 48 | **/ios/**/*.perspectivev3 49 | **/ios/**/*sync/ 50 | **/ios/**/.sconsign.dblite 51 | **/ios/**/.tags* 52 | **/ios/**/.vagrant/ 53 | **/ios/**/DerivedData/ 54 | **/ios/**/Icon? 55 | **/ios/**/Pods/ 56 | **/ios/**/.symlinks/ 57 | **/ios/**/profile 58 | **/ios/**/xcuserdata 59 | **/ios/.generated/ 60 | **/ios/Flutter/App.framework 61 | **/ios/Flutter/Flutter.framework 62 | **/ios/Flutter/Generated.xcconfig 63 | **/ios/Flutter/app.flx 64 | **/ios/Flutter/app.zip 65 | **/ios/Flutter/flutter_assets/ 66 | **/ios/ServiceDefinitions.json 67 | **/ios/Runner/GeneratedPluginRegistrant.* 68 | 69 | # Exceptions to above rules. 70 | !**/ios/**/default.mode1v3 71 | !**/ios/**/default.mode2v3 72 | !**/ios/**/default.pbxuser 73 | !**/ios/**/default.perspectivev3 74 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 75 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 362b999b90d53859aa7b926a59c970f3ea31abf4 8 | channel: dev 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Flutter (Client)", 9 | "type": "dart", 10 | "request": "launch", 11 | "program": "lib/main.dart" 12 | }, 13 | { 14 | "name": "Flutter (Server)", 15 | "type": "dart", 16 | "request": "launch", 17 | "program": "bin/server.dart" 18 | }, 19 | { 20 | "name": "Flutter (CLI)", 21 | "request": "launch", 22 | "type": "dart", 23 | "program": "bin/main.dart" 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Everywhere 2 | 3 | Web Demo (PWA): https://rodydavis.github.io/flutter_everywhere/#/ 4 | 5 | ## Targets 6 | 7 | - Web 8 | - Desktop (MacOS, Windows, Linux) 9 | - Android 10 | - iOS 11 | - Electron (MacOS, Windows, Linux) 12 | - CLI and dart2Native 13 | - Rest API 14 | - Chrome Extension 15 | 16 | ## Overview 17 | 18 | - Flutter Client Project: iOS, Android, Web, MacOS, Windows, Linux.. 19 | - Flutter Server Project: REST API to `lib/data/models` directory.. 20 | - Flutter Command Line Project: CLI to `lib/data/models` directory.. 21 | 22 | One project, multiple implementations. 23 | 24 | ### Usage (REST API) 25 | 26 | run the project from VsCode with the server config selected. 27 | 28 | then you can make post or get requests too `http:0.0.0.0/8080` 29 | 30 | `http://0.0.0.0/8080/counter?count=22` yields: 31 | 32 | ```json 33 | { 34 | "status": "success", 35 | "message": "Info", 36 | "body": { 37 | "counter": 22 38 | } 39 | } 40 | ``` 41 | 42 | ### Usage (CLI) 43 | 44 | `dart bin/main.dart counter --add 1` yields: 45 | 46 | ```auto 47 | Counter Value.. 0 48 | Adding..1 49 | Removing..0 50 | Counter Value.. 1 51 | ``` 52 | 53 | ### Usage (dart2Native) 54 | 55 | Build Executable: 56 | 57 | - `dart2native bin/main.dart -o counter` 58 | 59 | Run Executable: 60 | 61 | - `./counter counter --add 1` 62 | 63 | ```auto 64 | Counter Value.. 0 65 | Adding..1 66 | Removing..0 67 | Counter Value.. 1 68 | ``` 69 | 70 | ### Usage (Client) 71 | 72 | Run Flutter Project Like Normal 73 | 74 | `flutter run` 75 | 76 | - For Electron: 77 | 78 | Run: `npm install` 79 | Run: `npm run dev` or `npm run dev_skia` 80 | 81 | ```dart 82 | import 'package:flutter/material.dart'; 83 | 84 | import 'data/models/index.dart'; 85 | import 'plugins/desktop/desktop.dart'; 86 | 87 | void main() { 88 | setTargetPlatformForDesktop(); 89 | runApp(MyApp()); 90 | } 91 | 92 | class MyApp extends StatelessWidget { 93 | // This widget is the root of your application. 94 | @override 95 | Widget build(BuildContext context) { 96 | return MaterialApp( 97 | title: 'Flutter Demo', 98 | theme: ThemeData( 99 | // This is the theme of your application. 100 | // 101 | // Try running your application with "flutter run". You'll see the 102 | // application has a blue toolbar. Then, without quitting the app, try 103 | // changing the primarySwatch below to Colors.green and then invoke 104 | // "hot reload" (press "r" in the console where you ran "flutter run", 105 | // or simply save your changes to "hot reload" in a Flutter IDE). 106 | // Notice that the counter didn't reset back to zero; the application 107 | // is not restarted. 108 | primarySwatch: Colors.blue, 109 | ), 110 | home: MyHomePage(title: 'Flutter Demo Home Page'), 111 | ); 112 | } 113 | } 114 | 115 | class MyHomePage extends StatefulWidget { 116 | MyHomePage({Key key, this.title}) : super(key: key); 117 | 118 | // This widget is the home page of your application. It is stateful, meaning 119 | // that it has a State object (defined below) that contains fields that affect 120 | // how it looks. 121 | 122 | // This class is the configuration for the state. It holds the values (in this 123 | // case the title) provided by the parent (in this case the App widget) and 124 | // used by the build method of the State. Fields in a Widget subclass are 125 | // always marked "final". 126 | 127 | final String title; 128 | 129 | @override 130 | _MyHomePageState createState() => _MyHomePageState(); 131 | } 132 | 133 | class _MyHomePageState extends State { 134 | CounterModel _counter = CounterModel(); 135 | 136 | void _incrementCounter() { 137 | setState(() { 138 | // This call to setState tells the Flutter framework that something has 139 | // changed in this State, which causes it to rerun the build method below 140 | // so that the display can reflect the updated values. If we changed 141 | // _counter without calling setState(), then the build method would not be 142 | // called again, and so nothing would appear to happen. 143 | _counter.add(1); 144 | }); 145 | } 146 | 147 | @override 148 | Widget build(BuildContext context) { 149 | // This method is rerun every time setState is called, for instance as done 150 | // by the _incrementCounter method above. 151 | // 152 | // The Flutter framework has been optimized to make rerunning build methods 153 | // fast, so that you can just rebuild anything that needs updating rather 154 | // than having to individually change instances of widgets. 155 | return Scaffold( 156 | appBar: AppBar( 157 | // Here we take the value from the MyHomePage object that was created by 158 | // the App.build method, and use it to set our appbar title. 159 | title: Text(widget.title), 160 | ), 161 | body: Center( 162 | // Center is a layout widget. It takes a single child and positions it 163 | // in the middle of the parent. 164 | child: Column( 165 | // Column is also a layout widget. It takes a list of children and 166 | // arranges them vertically. By default, it sizes itself to fit its 167 | // children horizontally, and tries to be as tall as its parent. 168 | // 169 | // Invoke "debug painting" (press "p" in the console, choose the 170 | // "Toggle Debug Paint" action from the Flutter Inspector in Android 171 | // Studio, or the "Toggle Debug Paint" command in Visual Studio Code) 172 | // to see the wireframe for each widget. 173 | // 174 | // Column has various properties to control how it sizes itself and 175 | // how it positions its children. Here we use mainAxisAlignment to 176 | // center the children vertically; the main axis here is the vertical 177 | // axis because Columns are vertical (the cross axis would be 178 | // horizontal). 179 | mainAxisAlignment: MainAxisAlignment.center, 180 | children: [ 181 | Text( 182 | 'You have pushed the button this many times:', 183 | ), 184 | Text( 185 | '$_counter', 186 | style: Theme.of(context).textTheme.display1, 187 | ), 188 | ], 189 | ), 190 | ), 191 | floatingActionButton: FloatingActionButton( 192 | onPressed: _incrementCounter, 193 | tooltip: 'Increment', 194 | child: Icon(Icons.add), 195 | ), // This trailing comma makes auto-formatting nicer for build methods. 196 | ); 197 | } 198 | } 199 | 200 | ``` -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.example.flutter_everywhere" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | testImplementation 'junit:junit:4.12' 65 | androidTestImplementation 'androidx.test:runner:1.1.1' 66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 67 | } 68 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/flutter_everywhere/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.flutter_everywhere 2 | 3 | import android.os.Bundle 4 | import io.flutter.app.FlutterActivity 5 | import io.flutter.plugins.GeneratedPluginRegistrant 6 | 7 | class MainActivity: FlutterActivity() { 8 | override fun onCreate(savedInstanceState: Bundle?) { 9 | super.onCreate(savedInstanceState) 10 | GeneratedPluginRegistrant.registerWith(this) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /assets/fonts/AbrilFatface-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/AbrilFatface-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/GalleryIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/GalleryIcons.ttf -------------------------------------------------------------------------------- /assets/fonts/GoogleSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/GoogleSans-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/LibreFranklin-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/LibreFranklin-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/MaterialIcons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/MaterialIcons-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/Merriweather-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/Merriweather-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/Raleway-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/Raleway-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto/LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /assets/fonts/Roboto/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/Roboto/Roboto-Black.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/Roboto/Roboto-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/Roboto/Roboto-Light.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/Roboto/Roboto-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/Roboto/Roboto-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/Roboto/Roboto-Thin.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Eczar-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Eczar-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Eczar-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Eczar-SemiBold.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/LibreFranklin-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/LibreFranklin-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/LibreFranklin-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/LibreFranklin-ExtraBold.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/LibreFranklin-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/LibreFranklin-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/LibreFranklin-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/LibreFranklin-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/LibreFranklin-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/LibreFranklin-SemiBold.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Merriweather-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Merriweather-BoldItalic.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Merriweather-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Merriweather-Light.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Merriweather-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Merriweather-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Montserrat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Montserrat-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Montserrat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Montserrat-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Montserrat-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Montserrat-SemiBold.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Oswald-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Oswald-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Oswald-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Oswald-SemiBold.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Raleway-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Raleway-Light.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Raleway-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Raleway-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Raleway-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Raleway-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Raleway-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Raleway-SemiBold.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/RobotoMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/RobotoMono-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Rubik-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Rubik-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Rubik-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Rubik-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/google_fonts/Rubik-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/fonts/google_fonts/Rubik-Regular.ttf -------------------------------------------------------------------------------- /assets/images/icon/get_started128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/images/icon/get_started128.png -------------------------------------------------------------------------------- /assets/images/icon/get_started16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/images/icon/get_started16.png -------------------------------------------------------------------------------- /assets/images/icon/get_started32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/images/icon/get_started32.png -------------------------------------------------------------------------------- /assets/images/icon/get_started48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/assets/images/icon/get_started48.png -------------------------------------------------------------------------------- /background.js: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | 'use strict'; 6 | 7 | chrome.runtime.onInstalled.addListener(function () { 8 | chrome.declarativeContent.onPageChanged.removeRules(undefined, function () { 9 | chrome.declarativeContent.onPageChanged.addRules([{ 10 | conditions: [new chrome.declarativeContent.PageStateMatcher({ 11 | pageUrl: { hostEquals: 'dartpad.dev' }, 12 | })], 13 | actions: [new chrome.declarativeContent.ShowPageAction()] 14 | }]); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /bin/cli/counter.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:args/command_runner.dart'; 4 | import 'package:flutter_everywhere/data/models/counter.dart'; 5 | 6 | class CounterCommand extends Command { 7 | // The [name] and [description] properties must be defined by every 8 | // subclass. 9 | final name = "counter"; 10 | final description = "Increment and Decrement Counter"; 11 | 12 | /// dart bin/main.dart counter --add 1 13 | CounterCommand() { 14 | // [argParser] is automatically created by the parent class. 15 | // argParser.addFlag('all', abbr: 'a'); 16 | argParser..addOption('add', abbr: 'a', defaultsTo: '0'); 17 | argParser..addOption('remove', abbr: 'r', defaultsTo: '0'); 18 | } 19 | 20 | // [run] may also return a Future. 21 | void run() { 22 | // [argResults] is set before [run()] is called and contains the options 23 | // passed to this command. 24 | final _counter = CounterModel(); 25 | stderr.writeln('Counter Value.. ${_counter.value}'); 26 | final _add = argResults['add']; 27 | stderr.writeln('Adding..$_add'); 28 | _counter.add(int.tryParse(_add)); 29 | final _remove = argResults['remove']; 30 | stderr.writeln('Removing..$_remove'); 31 | _counter.remove(int.tryParse(_remove)); 32 | stderr.writeln('Counter Value.. ${_counter.value}'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /bin/cli/index.dart: -------------------------------------------------------------------------------- 1 | export 'counter.dart'; 2 | -------------------------------------------------------------------------------- /bin/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:args/command_runner.dart'; 3 | 4 | import 'cli/index.dart'; 5 | 6 | main(List arguments) { 7 | // 0 = Success 8 | // 1 = Warnings 9 | // 2 = Errors 10 | exitCode = 0; 11 | var runner = CommandRunner("runner", "Flutter Command Line Project") 12 | ..addCommand(CounterCommand()); 13 | runner.run(arguments).catchError((error) { 14 | if (error is! UsageException) throw error; 15 | print(error); 16 | exit(64); // Exit code 64 indicates a usage error. 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /bin/server.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:shelf/shelf.dart' as shelf; 4 | import 'package:shelf/shelf_io.dart' as io; 5 | 6 | import 'server/router.dart'; 7 | 8 | void main() { 9 | final handler = const shelf.Pipeline() 10 | .addMiddleware(shelf.logRequests()) 11 | .addHandler(Router.handler); 12 | 13 | final port = int.tryParse(Platform.environment['PORT'] ?? '8080'); 14 | final address = InternetAddress.anyIPv4; 15 | 16 | io.serve(handler, address, port).then((server) { 17 | server.autoCompress = true; 18 | print('Serving at http://${server.address.host}:${server.port}'); 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /bin/server/controllers/counter.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_everywhere/data/models/counter.dart'; 2 | import 'package:shelf/shelf.dart' as shelf; 3 | 4 | import '../response.dart'; 5 | 6 | class CounterController implements ResponseImpl { 7 | const CounterController(); 8 | 9 | @override 10 | Future result(shelf.Request request) async { 11 | final _model = CounterModel(); 12 | final _params = request.url.queryParameters; 13 | if (_params != null) { 14 | final _val = int.tryParse(_params['count'] ?? '0'); 15 | _model.set(_val); 16 | } else { 17 | _model.set(1); 18 | } 19 | return ServerResponse('Info', body: { 20 | "counter": _model.value, 21 | }).ok(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /bin/server/controllers/index.dart: -------------------------------------------------------------------------------- 1 | export 'counter.dart'; 2 | -------------------------------------------------------------------------------- /bin/server/response.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:shelf/shelf.dart' as shelf; 4 | 5 | class ServerResponse { 6 | final String message; 7 | final dynamic body; 8 | final StatusType type; 9 | 10 | ServerResponse( 11 | this.message, { 12 | this.type = StatusType.success, 13 | this.body, 14 | }); 15 | 16 | Map toJson() { 17 | return { 18 | "status": type.toString().replaceAll('StatusType.', ''), 19 | "message": message, 20 | "body": body ?? '', 21 | }; 22 | } 23 | 24 | String toJsonString() { 25 | return json.encode(toJson()); 26 | } 27 | 28 | shelf.Response ok() { 29 | return shelf.Response.ok( 30 | toJsonString(), 31 | headers: { 32 | 'Content-Type': 'application/json', 33 | }, 34 | ); 35 | } 36 | } 37 | 38 | enum StatusType { success, error } 39 | 40 | abstract class ResponseImpl { 41 | Future result(shelf.Request request); 42 | } 43 | -------------------------------------------------------------------------------- /bin/server/router.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:shelf/shelf.dart' as shelf; 4 | 5 | import 'controllers/index.dart'; 6 | import 'response.dart'; 7 | 8 | class Router { 9 | static FutureOr handler(shelf.Request request) { 10 | var component = request.url.pathSegments.first; 11 | var handler = _handlers(request)[component]; 12 | if (handler == null) return shelf.Response.notFound(null); 13 | return handler; 14 | } 15 | 16 | static Map> _handlers( 17 | shelf.Request request) { 18 | return { 19 | 'info': ServerResponse('Info', body: { 20 | "version": 'v1.0.0', 21 | "status": "ok", 22 | }).ok(), 23 | 'counter': CounterController().result(request), 24 | }; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /counter: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/counter -------------------------------------------------------------------------------- /debug.js: -------------------------------------------------------------------------------- 1 | // Modules to control application life and create native browser window 2 | const { app, BrowserWindow } = require('electron') 3 | const path = require('path') 4 | 5 | // Keep a global reference of the window object, if you don't, the window will 6 | // be closed automatically when the JavaScript object is garbage collected. 7 | let mainWindow 8 | 9 | function createWindow() { 10 | // Create the browser window. 11 | mainWindow = new BrowserWindow({ 12 | width: 800, 13 | height: 600, 14 | webPreferences: { 15 | preload: path.join(__dirname, 'preload.js') 16 | } 17 | }) 18 | 19 | // and load the index.html of the app. 20 | mainWindow.loadURL("http://localhost:8080") 21 | 22 | // Open the DevTools. 23 | // mainWindow.webContents.openDevTools() 24 | 25 | // Emitted when the window is closed. 26 | mainWindow.on('closed', function () { 27 | // Dereference the window object, usually you would store windows 28 | // in an array if your app supports multi windows, this is the time 29 | // when you should delete the corresponding element. 30 | mainWindow = null 31 | }) 32 | } 33 | 34 | // This method will be called when Electron has finished 35 | // initialization and is ready to create browser windows. 36 | // Some APIs can only be used after this event occurs. 37 | app.on('ready', createWindow) 38 | 39 | // Quit when all windows are closed. 40 | app.on('window-all-closed', function () { 41 | // On macOS it is common for applications and their menu bar 42 | // to stay active until the user quits explicitly with Cmd + Q 43 | if (process.platform !== 'darwin') app.quit() 44 | }) 45 | 46 | app.on('activate', function () { 47 | // On macOS it's common to re-create a window in the app when the 48 | // dock icon is clicked and there are no other windows open. 49 | if (mainWindow === null) createWindow() 50 | }) 51 | 52 | // In this file you can include the rest of your app's specific main process 53 | // code. You can also put them in separate files and require them here. 54 | -------------------------------------------------------------------------------- /docs/assets/AssetManifest.json: -------------------------------------------------------------------------------- 1 | {"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"]} -------------------------------------------------------------------------------- /docs/assets/FontManifest.json: -------------------------------------------------------------------------------- 1 | [{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.ttf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]}] -------------------------------------------------------------------------------- /docs/assets/fonts/MaterialIcons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/docs/assets/fonts/MaterialIcons-Regular.ttf -------------------------------------------------------------------------------- /docs/assets/packages/cupertino_icons/assets/CupertinoIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/docs/assets/packages/cupertino_icons/assets/CupertinoIcons.ttf -------------------------------------------------------------------------------- /docs/flutter_service_worker.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const CACHE_NAME = 'flutter-app-cache'; 3 | const RESOURCES = { 4 | "/index.html": "86a2fb2f45aa4cb49ef037477ec965ea", 5 | "/main.dart.js.deps": "502689807215fbe23a531ff018a90bca", 6 | "/main.dart.js": "48c9dbc0331718e01f7862fe03514b96", 7 | "/icons/Icon-192.png": "ac9a721a12bbc803b44f645561ecb1e1", 8 | "/icons/Icon-512.png": "96e752610906ba2a93c65f8abe1645f1", 9 | "/manifest.json": "6503229a102cf5c34c6c85c40b454df6", 10 | "/assets/LICENSE": "e7a82984f48f196ac6c89b01ef64e61d", 11 | "/assets/AssetManifest.json": "2efbb41d7877d10aac9d091f58ccd7b9", 12 | "/assets/FontManifest.json": "01700ba55b08a6141f33e168c4a6c22f", 13 | "/assets/packages/cupertino_icons/assets/CupertinoIcons.ttf": "9a62a954b81a1ad45a58b9bcea89b50b", 14 | "/assets/fonts/MaterialIcons-Regular.ttf": "56d3ffdef7a25659eab6a68a3fbfaf16" 15 | }; 16 | 17 | self.addEventListener('activate', function (event) { 18 | event.waitUntil( 19 | caches.keys().then(function (cacheName) { 20 | return caches.delete(cacheName); 21 | }).then(function (_) { 22 | return caches.open(CACHE_NAME); 23 | }).then(function (cache) { 24 | return cache.addAll(Object.keys(RESOURCES)); 25 | }) 26 | ); 27 | }); 28 | 29 | self.addEventListener('fetch', function (event) { 30 | event.respondWith( 31 | caches.match(event.request) 32 | .then(function (response) { 33 | if (response) { 34 | return response; 35 | } 36 | return fetch(event.request, { 37 | credentials: 'include' 38 | }); 39 | }) 40 | ); 41 | }); 42 | -------------------------------------------------------------------------------- /docs/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/docs/icons/Icon-192.png -------------------------------------------------------------------------------- /docs/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/docs/icons/Icon-512.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | flutter_everywhere 15 | 16 | 17 | 18 | 21 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flutter_everywhere", 3 | "short_name": "flutter_everywhere", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 18 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 19 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXCopyFilesBuildPhase section */ 23 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 24 | isa = PBXCopyFilesBuildPhase; 25 | buildActionMask = 2147483647; 26 | dstPath = ""; 27 | dstSubfolderSpec = 10; 28 | files = ( 29 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 30 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 31 | ); 32 | name = "Embed Frameworks"; 33 | runOnlyForDeploymentPostprocessing = 0; 34 | }; 35 | /* End PBXCopyFilesBuildPhase section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 39 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 40 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 41 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 42 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 43 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 45 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 46 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 47 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 48 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 50 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 51 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 52 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 61 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | /* End PBXFrameworksBuildPhase section */ 66 | 67 | /* Begin PBXGroup section */ 68 | 9740EEB11CF90186004384FC /* Flutter */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 3B80C3931E831B6300D905FE /* App.framework */, 72 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 73 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 74 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 75 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 76 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 77 | ); 78 | name = Flutter; 79 | sourceTree = ""; 80 | }; 81 | 97C146E51CF9000F007C117D = { 82 | isa = PBXGroup; 83 | children = ( 84 | 9740EEB11CF90186004384FC /* Flutter */, 85 | 97C146F01CF9000F007C117D /* Runner */, 86 | 97C146EF1CF9000F007C117D /* Products */, 87 | ); 88 | sourceTree = ""; 89 | }; 90 | 97C146EF1CF9000F007C117D /* Products */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 97C146EE1CF9000F007C117D /* Runner.app */, 94 | ); 95 | name = Products; 96 | sourceTree = ""; 97 | }; 98 | 97C146F01CF9000F007C117D /* Runner */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 104 | 97C147021CF9000F007C117D /* Info.plist */, 105 | 97C146F11CF9000F007C117D /* Supporting Files */, 106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 108 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 109 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 110 | ); 111 | path = Runner; 112 | sourceTree = ""; 113 | }; 114 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | /* End PBXGroup section */ 122 | 123 | /* Begin PBXNativeTarget section */ 124 | 97C146ED1CF9000F007C117D /* Runner */ = { 125 | isa = PBXNativeTarget; 126 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 127 | buildPhases = ( 128 | 9740EEB61CF901F6004384FC /* Run Script */, 129 | 97C146EA1CF9000F007C117D /* Sources */, 130 | 97C146EB1CF9000F007C117D /* Frameworks */, 131 | 97C146EC1CF9000F007C117D /* Resources */, 132 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 133 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 134 | ); 135 | buildRules = ( 136 | ); 137 | dependencies = ( 138 | ); 139 | name = Runner; 140 | productName = Runner; 141 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 142 | productType = "com.apple.product-type.application"; 143 | }; 144 | /* End PBXNativeTarget section */ 145 | 146 | /* Begin PBXProject section */ 147 | 97C146E61CF9000F007C117D /* Project object */ = { 148 | isa = PBXProject; 149 | attributes = { 150 | LastUpgradeCheck = 1020; 151 | ORGANIZATIONNAME = "The Chromium Authors"; 152 | TargetAttributes = { 153 | 97C146ED1CF9000F007C117D = { 154 | CreatedOnToolsVersion = 7.3.1; 155 | LastSwiftMigration = 1100; 156 | }; 157 | }; 158 | }; 159 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 160 | compatibilityVersion = "Xcode 3.2"; 161 | developmentRegion = en; 162 | hasScannedForEncodings = 0; 163 | knownRegions = ( 164 | en, 165 | Base, 166 | ); 167 | mainGroup = 97C146E51CF9000F007C117D; 168 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 169 | projectDirPath = ""; 170 | projectRoot = ""; 171 | targets = ( 172 | 97C146ED1CF9000F007C117D /* Runner */, 173 | ); 174 | }; 175 | /* End PBXProject section */ 176 | 177 | /* Begin PBXResourcesBuildPhase section */ 178 | 97C146EC1CF9000F007C117D /* Resources */ = { 179 | isa = PBXResourcesBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 183 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 184 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 185 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | }; 189 | /* End PBXResourcesBuildPhase section */ 190 | 191 | /* Begin PBXShellScriptBuildPhase section */ 192 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 193 | isa = PBXShellScriptBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | ); 197 | inputPaths = ( 198 | ); 199 | name = "Thin Binary"; 200 | outputPaths = ( 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | shellPath = /bin/sh; 204 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 205 | }; 206 | 9740EEB61CF901F6004384FC /* Run Script */ = { 207 | isa = PBXShellScriptBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | ); 211 | inputPaths = ( 212 | ); 213 | name = "Run Script"; 214 | outputPaths = ( 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | shellPath = /bin/sh; 218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 219 | }; 220 | /* End PBXShellScriptBuildPhase section */ 221 | 222 | /* Begin PBXSourcesBuildPhase section */ 223 | 97C146EA1CF9000F007C117D /* Sources */ = { 224 | isa = PBXSourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 228 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | /* End PBXSourcesBuildPhase section */ 233 | 234 | /* Begin PBXVariantGroup section */ 235 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 236 | isa = PBXVariantGroup; 237 | children = ( 238 | 97C146FB1CF9000F007C117D /* Base */, 239 | ); 240 | name = Main.storyboard; 241 | sourceTree = ""; 242 | }; 243 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 244 | isa = PBXVariantGroup; 245 | children = ( 246 | 97C147001CF9000F007C117D /* Base */, 247 | ); 248 | name = LaunchScreen.storyboard; 249 | sourceTree = ""; 250 | }; 251 | /* End PBXVariantGroup section */ 252 | 253 | /* Begin XCBuildConfiguration section */ 254 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 255 | isa = XCBuildConfiguration; 256 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 257 | buildSettings = { 258 | ALWAYS_SEARCH_USER_PATHS = NO; 259 | CLANG_ANALYZER_NONNULL = YES; 260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 261 | CLANG_CXX_LIBRARY = "libc++"; 262 | CLANG_ENABLE_MODULES = YES; 263 | CLANG_ENABLE_OBJC_ARC = YES; 264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 265 | CLANG_WARN_BOOL_CONVERSION = YES; 266 | CLANG_WARN_COMMA = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 270 | CLANG_WARN_EMPTY_BODY = YES; 271 | CLANG_WARN_ENUM_CONVERSION = YES; 272 | CLANG_WARN_INFINITE_RECURSION = YES; 273 | CLANG_WARN_INT_CONVERSION = YES; 274 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 275 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 279 | CLANG_WARN_STRICT_PROTOTYPES = YES; 280 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 281 | CLANG_WARN_UNREACHABLE_CODE = YES; 282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 284 | COPY_PHASE_STRIP = NO; 285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 286 | ENABLE_NS_ASSERTIONS = NO; 287 | ENABLE_STRICT_OBJC_MSGSEND = YES; 288 | GCC_C_LANGUAGE_STANDARD = gnu99; 289 | GCC_NO_COMMON_BLOCKS = YES; 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 297 | MTL_ENABLE_DEBUG_INFO = NO; 298 | SDKROOT = iphoneos; 299 | SUPPORTED_PLATFORMS = iphoneos; 300 | TARGETED_DEVICE_FAMILY = "1,2"; 301 | VALIDATE_PRODUCT = YES; 302 | }; 303 | name = Profile; 304 | }; 305 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 306 | isa = XCBuildConfiguration; 307 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 308 | buildSettings = { 309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 310 | CLANG_ENABLE_MODULES = YES; 311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 312 | ENABLE_BITCODE = NO; 313 | FRAMEWORK_SEARCH_PATHS = ( 314 | "$(inherited)", 315 | "$(PROJECT_DIR)/Flutter", 316 | ); 317 | INFOPLIST_FILE = Runner/Info.plist; 318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 319 | LIBRARY_SEARCH_PATHS = ( 320 | "$(inherited)", 321 | "$(PROJECT_DIR)/Flutter", 322 | ); 323 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterEverywhere; 324 | PRODUCT_NAME = "$(TARGET_NAME)"; 325 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 326 | SWIFT_VERSION = 5.0; 327 | VERSIONING_SYSTEM = "apple-generic"; 328 | }; 329 | name = Profile; 330 | }; 331 | 97C147031CF9000F007C117D /* Debug */ = { 332 | isa = XCBuildConfiguration; 333 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_ANALYZER_NONNULL = YES; 337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 338 | CLANG_CXX_LIBRARY = "libc++"; 339 | CLANG_ENABLE_MODULES = YES; 340 | CLANG_ENABLE_OBJC_ARC = YES; 341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_COMMA = YES; 344 | CLANG_WARN_CONSTANT_CONVERSION = YES; 345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 356 | CLANG_WARN_STRICT_PROTOTYPES = YES; 357 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 358 | CLANG_WARN_UNREACHABLE_CODE = YES; 359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 361 | COPY_PHASE_STRIP = NO; 362 | DEBUG_INFORMATION_FORMAT = dwarf; 363 | ENABLE_STRICT_OBJC_MSGSEND = YES; 364 | ENABLE_TESTABILITY = YES; 365 | GCC_C_LANGUAGE_STANDARD = gnu99; 366 | GCC_DYNAMIC_NO_PIC = NO; 367 | GCC_NO_COMMON_BLOCKS = YES; 368 | GCC_OPTIMIZATION_LEVEL = 0; 369 | GCC_PREPROCESSOR_DEFINITIONS = ( 370 | "DEBUG=1", 371 | "$(inherited)", 372 | ); 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 380 | MTL_ENABLE_DEBUG_INFO = YES; 381 | ONLY_ACTIVE_ARCH = YES; 382 | SDKROOT = iphoneos; 383 | TARGETED_DEVICE_FAMILY = "1,2"; 384 | }; 385 | name = Debug; 386 | }; 387 | 97C147041CF9000F007C117D /* Release */ = { 388 | isa = XCBuildConfiguration; 389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 390 | buildSettings = { 391 | ALWAYS_SEARCH_USER_PATHS = NO; 392 | CLANG_ANALYZER_NONNULL = YES; 393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 394 | CLANG_CXX_LIBRARY = "libc++"; 395 | CLANG_ENABLE_MODULES = YES; 396 | CLANG_ENABLE_OBJC_ARC = YES; 397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 398 | CLANG_WARN_BOOL_CONVERSION = YES; 399 | CLANG_WARN_COMMA = YES; 400 | CLANG_WARN_CONSTANT_CONVERSION = YES; 401 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 402 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 403 | CLANG_WARN_EMPTY_BODY = YES; 404 | CLANG_WARN_ENUM_CONVERSION = YES; 405 | CLANG_WARN_INFINITE_RECURSION = YES; 406 | CLANG_WARN_INT_CONVERSION = YES; 407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 412 | CLANG_WARN_STRICT_PROTOTYPES = YES; 413 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 414 | CLANG_WARN_UNREACHABLE_CODE = YES; 415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 417 | COPY_PHASE_STRIP = NO; 418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 419 | ENABLE_NS_ASSERTIONS = NO; 420 | ENABLE_STRICT_OBJC_MSGSEND = YES; 421 | GCC_C_LANGUAGE_STANDARD = gnu99; 422 | GCC_NO_COMMON_BLOCKS = YES; 423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 425 | GCC_WARN_UNDECLARED_SELECTOR = YES; 426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 427 | GCC_WARN_UNUSED_FUNCTION = YES; 428 | GCC_WARN_UNUSED_VARIABLE = YES; 429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 430 | MTL_ENABLE_DEBUG_INFO = NO; 431 | SDKROOT = iphoneos; 432 | SUPPORTED_PLATFORMS = iphoneos; 433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | VALIDATE_PRODUCT = YES; 436 | }; 437 | name = Release; 438 | }; 439 | 97C147061CF9000F007C117D /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | CLANG_ENABLE_MODULES = YES; 445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 446 | ENABLE_BITCODE = NO; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | INFOPLIST_FILE = Runner/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 453 | LIBRARY_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Flutter", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterEverywhere; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 461 | SWIFT_VERSION = 5.0; 462 | VERSIONING_SYSTEM = "apple-generic"; 463 | }; 464 | name = Debug; 465 | }; 466 | 97C147071CF9000F007C117D /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 469 | buildSettings = { 470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 471 | CLANG_ENABLE_MODULES = YES; 472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 473 | ENABLE_BITCODE = NO; 474 | FRAMEWORK_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "$(PROJECT_DIR)/Flutter", 477 | ); 478 | INFOPLIST_FILE = Runner/Info.plist; 479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 480 | LIBRARY_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "$(PROJECT_DIR)/Flutter", 483 | ); 484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterEverywhere; 485 | PRODUCT_NAME = "$(TARGET_NAME)"; 486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 487 | SWIFT_VERSION = 5.0; 488 | VERSIONING_SYSTEM = "apple-generic"; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | 97C147031CF9000F007C117D /* Debug */, 499 | 97C147041CF9000F007C117D /* Release */, 500 | 249021D3217E4FDB00AE95B9 /* Profile */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 97C147061CF9000F007C117D /* Debug */, 509 | 97C147071CF9000F007C117D /* Release */, 510 | 249021D4217E4FDB00AE95B9 /* Profile */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | /* End XCConfigurationList section */ 516 | }; 517 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 518 | } 519 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_everywhere 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /lib/data/models/counter.dart: -------------------------------------------------------------------------------- 1 | class CounterModel { 2 | int _value = 0; 3 | 4 | int get value => _value; 5 | 6 | void set(int val) => _value = val; 7 | void add(int val) => _value += val; 8 | void remove(int val) => _value -= val; 9 | 10 | void reset() => _value = 0; 11 | 12 | @override 13 | String toString() { 14 | return value.toString(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/data/models/index.dart: -------------------------------------------------------------------------------- 1 | export 'counter.dart'; 2 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'data/models/index.dart'; 5 | import 'plugins/desktop/desktop.dart'; 6 | 7 | void main() { 8 | if (!kIsWeb) setTargetPlatformForDesktop(); 9 | runApp(MyApp()); 10 | } 11 | 12 | class MyApp extends StatelessWidget { 13 | // This widget is the root of your application. 14 | @override 15 | Widget build(BuildContext context) { 16 | return MaterialApp( 17 | debugShowCheckedModeBanner: false, 18 | title: 'Flutter Demo', 19 | theme: ThemeData.light().copyWith( 20 | // This is the theme of your application. 21 | // 22 | // Try running your application with "flutter run". You'll see the 23 | // application has a blue toolbar. Then, without quitting the app, try 24 | // changing the primarySwatch below to Colors.green and then invoke 25 | // "hot reload" (press "r" in the console where you ran "flutter run", 26 | // or simply save your changes to "hot reload" in a Flutter IDE). 27 | // Notice that the counter didn't reset back to zero; the application 28 | // is not restarted. 29 | primaryColor: Colors.blue, 30 | ), 31 | darkTheme: ThemeData.dark(), 32 | home: MyHomePage(title: 'Flutter Demo Home Page'), 33 | ); 34 | } 35 | } 36 | 37 | class MyHomePage extends StatefulWidget { 38 | MyHomePage({Key key, this.title}) : super(key: key); 39 | 40 | // This widget is the home page of your application. It is stateful, meaning 41 | // that it has a State object (defined below) that contains fields that affect 42 | // how it looks. 43 | 44 | // This class is the configuration for the state. It holds the values (in this 45 | // case the title) provided by the parent (in this case the App widget) and 46 | // used by the build method of the State. Fields in a Widget subclass are 47 | // always marked "final". 48 | 49 | final String title; 50 | 51 | @override 52 | _MyHomePageState createState() => _MyHomePageState(); 53 | } 54 | 55 | class _MyHomePageState extends State { 56 | CounterModel _counter = CounterModel(); 57 | 58 | void _incrementCounter() { 59 | setState(() { 60 | // This call to setState tells the Flutter framework that something has 61 | // changed in this State, which causes it to rerun the build method below 62 | // so that the display can reflect the updated values. If we changed 63 | // _counter without calling setState(), then the build method would not be 64 | // called again, and so nothing would appear to happen. 65 | _counter.add(1); 66 | }); 67 | } 68 | 69 | @override 70 | Widget build(BuildContext context) { 71 | // This method is rerun every time setState is called, for instance as done 72 | // by the _incrementCounter method above. 73 | // 74 | // The Flutter framework has been optimized to make rerunning build methods 75 | // fast, so that you can just rebuild anything that needs updating rather 76 | // than having to individually change instances of widgets. 77 | return Scaffold( 78 | appBar: AppBar( 79 | // Here we take the value from the MyHomePage object that was created by 80 | // the App.build method, and use it to set our appbar title. 81 | title: Text(widget.title), 82 | ), 83 | body: Center( 84 | // Center is a layout widget. It takes a single child and positions it 85 | // in the middle of the parent. 86 | child: Column( 87 | // Column is also a layout widget. It takes a list of children and 88 | // arranges them vertically. By default, it sizes itself to fit its 89 | // children horizontally, and tries to be as tall as its parent. 90 | // 91 | // Invoke "debug painting" (press "p" in the console, choose the 92 | // "Toggle Debug Paint" action from the Flutter Inspector in Android 93 | // Studio, or the "Toggle Debug Paint" command in Visual Studio Code) 94 | // to see the wireframe for each widget. 95 | // 96 | // Column has various properties to control how it sizes itself and 97 | // how it positions its children. Here we use mainAxisAlignment to 98 | // center the children vertically; the main axis here is the vertical 99 | // axis because Columns are vertical (the cross axis would be 100 | // horizontal). 101 | mainAxisAlignment: MainAxisAlignment.center, 102 | children: [ 103 | Text( 104 | 'You have pushed the button this many times:', 105 | ), 106 | Text( 107 | '$_counter', 108 | style: Theme.of(context).textTheme.display1, 109 | ), 110 | ], 111 | ), 112 | ), 113 | floatingActionButton: FloatingActionButton( 114 | onPressed: _incrementCounter, 115 | tooltip: 'Increment', 116 | child: Icon(Icons.add), 117 | ), // This trailing comma makes auto-formatting nicer for build methods. 118 | ); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /lib/plugins/desktop/desktop.dart: -------------------------------------------------------------------------------- 1 | export 'unsupported.dart' if (dart.library.io) 'io.dart'; 2 | -------------------------------------------------------------------------------- /lib/plugins/desktop/io.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | void setTargetPlatformForDesktop({TargetPlatform platform}) { 7 | TargetPlatform targetPlatform; 8 | if (platform != null) { 9 | targetPlatform = platform; 10 | } 11 | if (targetPlatform == null) { 12 | if (Platform.isMacOS) { 13 | targetPlatform = TargetPlatform.iOS; 14 | } else if (Platform.isLinux || Platform.isWindows) { 15 | targetPlatform = TargetPlatform.android; 16 | } 17 | } 18 | debugDefaultTargetPlatformOverride = targetPlatform; 19 | } 20 | -------------------------------------------------------------------------------- /lib/plugins/desktop/unsupported.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | void setTargetPlatformForDesktop({TargetPlatform platform}) {} 4 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | .generated_flutter_root 2 | -------------------------------------------------------------------------------- /linux/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Example-specific variables. 16 | # To modify this Makefile for a different application, these are the values 17 | # that are mostly likely to need to be changed. 18 | 19 | # Executable name. 20 | BINARY_NAME=flutter_desktop_example 21 | # The C++ code for the embedder application. 22 | SOURCES=flutter_embedder_example.cc 23 | 24 | 25 | # Default build type. For a release build, set BUILD=release. 26 | # Currently this only sets NDEBUG, which is used to control the flags passed 27 | # to the Flutter engine in the example shell, and not the complation settings 28 | # (e.g., optimization level) of the C++ code. 29 | BUILD=debug 30 | 31 | # Dependency locations 32 | FLUTTER_APP_DIR=$(CURDIR)/.. 33 | FLUTTER_APP_BUILD_DIR=$(FLUTTER_APP_DIR)/build 34 | FLUTTER_ROOT:=$(shell cat $(CURDIR)/.generated_flutter_root) 35 | FLUTTER_ARTIFACT_CACHE_DIR=$(FLUTTER_ROOT)/bin/cache/artifacts/engine/linux-x64 36 | 37 | OUT_DIR=$(FLUTTER_APP_BUILD_DIR)/linux 38 | CACHE_DIR=$(OUT_DIR)/cache 39 | FLUTTER_LIBRARY_COPY_DIR=$(CACHE_DIR)/flutter_library 40 | 41 | FLUTTER_LIB_NAME=flutter_linux 42 | FLUTTER_LIB=$(FLUTTER_LIBRARY_COPY_DIR)/lib$(FLUTTER_LIB_NAME).so 43 | 44 | # Tools 45 | FLUTTER_BIN=$(FLUTTER_ROOT)/bin/flutter 46 | 47 | # Resources 48 | ICU_DATA_NAME=icudtl.dat 49 | ICU_DATA_SOURCE=$(FLUTTER_ARTIFACT_CACHE_DIR)/$(ICU_DATA_NAME) 50 | FLUTTER_ASSETS_NAME=flutter_assets 51 | FLUTTER_ASSETS_SOURCE=$(FLUTTER_APP_BUILD_DIR)/$(FLUTTER_ASSETS_NAME) 52 | 53 | # Bundle structure 54 | BUNDLE_OUT_DIR=$(OUT_DIR)/$(BUILD) 55 | BUNDLE_DATA_DIR=$(BUNDLE_OUT_DIR)/data 56 | BUNDLE_LIB_DIR=$(BUNDLE_OUT_DIR)/lib 57 | 58 | BIN_OUT=$(BUNDLE_OUT_DIR)/$(BINARY_NAME) 59 | ICU_DATA_OUT=$(BUNDLE_DATA_DIR)/$(ICU_DATA_NAME) 60 | FLUTTER_LIB_OUT=$(BUNDLE_LIB_DIR)/$(notdir $(FLUTTER_LIB)) 61 | 62 | # Add relevant code from the wrapper library, which is intended to be statically 63 | # built into the client. 64 | WRAPPER_ROOT=$(FLUTTER_LIBRARY_COPY_DIR)/cpp_client_wrapper 65 | WRAPPER_SOURCES= \ 66 | $(WRAPPER_ROOT)/flutter_window_controller.cc \ 67 | $(WRAPPER_ROOT)/plugin_registrar.cc \ 68 | $(WRAPPER_ROOT)/engine_method_result.cc 69 | SOURCES+=$(WRAPPER_SOURCES) 70 | 71 | # Headers 72 | WRAPPER_INCLUDE_DIR=$(WRAPPER_ROOT)/include 73 | INCLUDE_DIRS=$(FLUTTER_LIBRARY_COPY_DIR) $(WRAPPER_INCLUDE_DIR) 74 | 75 | # The stamp file created by copy_flutter_files. 76 | FLUTTER_COPY_STAMP_FILE=$(FLUTTER_LIBRARY_COPY_DIR)/.last_copied_flutter_version 77 | # The Flutter engine version file. 78 | FLUTTER_ENGINE_VERSION_FILE=$(FLUTTER_ROOT)/bin/internal/engine.version 79 | 80 | # Build settings 81 | CXX=g++ -std=c++14 82 | CXXFLAGS.release=-DNDEBUG 83 | CXXFLAGS=-Wall -Werror $(CXXFLAGS.$(BUILD)) 84 | CPPFLAGS=$(patsubst %,-I%,$(INCLUDE_DIRS)) 85 | LDFLAGS=-L$(BUNDLE_LIB_DIR) \ 86 | -l$(FLUTTER_LIB_NAME) \ 87 | -Wl,-rpath=\$$ORIGIN/lib 88 | 89 | # Targets 90 | 91 | .PHONY: all 92 | all: $(BIN_OUT) bundle 93 | 94 | .PHONY: bundle 95 | bundle: $(ICU_DATA_OUT) $(FLUTTER_LIB_OUT) bundleflutterassets 96 | 97 | $(BIN_OUT): $(SOURCES) $(FLUTTER_LIB_OUT) 98 | mkdir -p $(@D) 99 | $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(SOURCES) $(LDFLAGS) -o $@ 100 | 101 | $(WRAPPER_SOURCES) $(FLUTTER_LIB) $(ICU_DATA_SOURCE): $(FLUTTER_COPY_STAMP_FILE) 102 | 103 | # When the Flutter engine version changes, the local copy of engine artifacts 104 | # needs to be updated. 105 | $(FLUTTER_COPY_STAMP_FILE): $(FLUTTER_ENGINE_VERSION_FILE) 106 | $(FLUTTER_BIN) precache --linux --no-android --no-ios 107 | rm -rf $(FLUTTER_LIBRARY_COPY_DIR) 108 | mkdir -p $(FLUTTER_LIBRARY_COPY_DIR) 109 | cp $(FLUTTER_ARTIFACT_CACHE_DIR)/*.h $(FLUTTER_LIBRARY_COPY_DIR)/ 110 | cp $(FLUTTER_ARTIFACT_CACHE_DIR)/*.so $(FLUTTER_LIBRARY_COPY_DIR)/ 111 | cp -r $(FLUTTER_ARTIFACT_CACHE_DIR)/cpp_client_wrapper \ 112 | $(FLUTTER_LIBRARY_COPY_DIR)/ 113 | touch $(FLUTTER_COPY_STAMP_FILE) 114 | 115 | $(FLUTTER_LIB_OUT): $(FLUTTER_LIB) 116 | mkdir -p $(BUNDLE_LIB_DIR) 117 | cp $(FLUTTER_LIB) $(BUNDLE_LIB_DIR) 118 | 119 | $(ICU_DATA_OUT): $(ICU_DATA_SOURCE) 120 | mkdir -p $(dir $(ICU_DATA_OUT)) 121 | cp $(ICU_DATA_SOURCE) $(ICU_DATA_OUT) 122 | 123 | # Fully re-copy the assets directory on each build to avoid having to keep a 124 | # comprehensive list of all asset files here, which would be fragile to changes 125 | # in the Flutter example (e.g., adding a new font to pubspec.yaml would require 126 | # changes here). 127 | .PHONY: bundleflutterassets 128 | bundleflutterassets: $(FLUTTER_ASSETS_SOURCE) 129 | mkdir -p $(BUNDLE_DATA_DIR) 130 | rsync -rpu --delete $(FLUTTER_ASSETS_SOURCE) $(BUNDLE_DATA_DIR) 131 | 132 | # PHONY since the Makefile doesn't have all the dependency information necessary 133 | # to know if 'build bundle' needs to be re-run. 134 | .PHONY: $(FLUTTER_ASSETS_SOURCE) 135 | $(FLUTTER_ASSETS_SOURCE): 136 | cd $(FLUTTER_APP_DIR); \ 137 | $(FLUTTER_BIN) build bundle $(FLUTTER_BUNDLE_FLAGS) 138 | 139 | .PHONY: clean 140 | clean: 141 | rm -rf $(OUT_DIR); \ 142 | cd $(FLUTTER_APP_DIR); \ 143 | $(FLUTTER_BIN) clean 144 | -------------------------------------------------------------------------------- /linux/app_configuration.mk: -------------------------------------------------------------------------------- 1 | # This file contains variables that applications are likely to need to 2 | # change, to isolate them from the main Makefile where the build rules are still 3 | # in flux. This should simplify re-creating the runner while preserving local 4 | # changes. 5 | 6 | # Executable name. 7 | BINARY_NAME=flutter_everywhere 8 | # Any extra source files to build. 9 | EXTRA_SOURCES= 10 | # Paths of any additional libraries to be bundled in the output directory. 11 | EXTRA_BUNDLED_LIBRARIES= 12 | # Extra flags (e.g., for library dependencies). 13 | SYSTEM_LIBRARIES= 14 | EXTRA_CXXFLAGS= 15 | EXTRA_CPPFLAGS= 16 | EXTRA_LDFLAGS= -------------------------------------------------------------------------------- /linux/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2019 Google LLC 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # This script runs the Linux Make build. 18 | # 19 | # Having this file in this location, with this name, enables the current 20 | # experimental 'flutter build' support for desktop. 21 | 22 | # Arguments 23 | readonly flutter_root="$1" 24 | readonly flutter_config="$2" 25 | readonly widget_tracking="$3" 26 | 27 | if [[ $widget_tracking == "track-widget-creation" ]]; then 28 | readonly bundle_flags="--track-widget-creation"; 29 | fi 30 | 31 | # Directories 32 | readonly base_dir="$(dirname "$0")" 33 | 34 | # Store the Flutter root so that Make can be used directly for future builds. 35 | echo $flutter_root > $base_dir/.generated_flutter_root 36 | 37 | make -C "$base_dir" \ 38 | BUILD="${flutter_config}" \ 39 | FLUTTER_ROOT="${flutter_root}" \ 40 | FLUTTER_BUNDLE_FLAGS="${bundle_flags}" 41 | -------------------------------------------------------------------------------- /linux/flutter/.template_version: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #include "generated_plugin_registrant.h" 6 | 7 | 8 | void RegisterPlugins(flutter::PluginRegistry* registry) { 9 | } 10 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 6 | #define GENERATED_PLUGIN_REGISTRANT_ 7 | 8 | #include 9 | 10 | // Registers Flutter plugins. 11 | void RegisterPlugins(flutter::PluginRegistry* registry); 12 | 13 | #endif // GENERATED_PLUGIN_REGISTRANT_ 14 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.mk: -------------------------------------------------------------------------------- 1 | # Plugins to include in the build. 2 | GENERATED_PLUGINS=\ 3 | 4 | GENERATED_PLUGINS_DIR=flutter/ephemeral/.plugin_symlinks 5 | # A plugin library name plugin name with _plugin appended. 6 | GENERATED_PLUGIN_LIB_NAMES=$(foreach plugin,$(GENERATED_PLUGINS),$(plugin)_plugin) 7 | 8 | # Variables for use in the enclosing Makefile. Changes to these names are 9 | # breaking changes. 10 | PLUGIN_TARGETS=$(GENERATED_PLUGINS) 11 | PLUGIN_LIBRARIES=$(foreach plugin,$(GENERATED_PLUGIN_LIB_NAMES),\ 12 | $(OUT_DIR)/lib$(plugin).so) 13 | PLUGIN_LDFLAGS=$(patsubst %,-l%,$(GENERATED_PLUGIN_LIB_NAMES)) 14 | PLUGIN_CPPFLAGS=$(foreach plugin,$(GENERATED_PLUGINS),\ 15 | -I$(GENERATED_PLUGINS_DIR)/$(plugin)/linux) 16 | 17 | # Targets 18 | 19 | # Implicit rules don't match phony targets, so list plugin builds explicitly. 20 | 21 | .PHONY: $(GENERATED_PLUGINS) 22 | $(GENERATED_PLUGINS): 23 | make -C $(GENERATED_PLUGINS_DIR)/$@/linux \ 24 | OUT_DIR=$(OUT_DIR) \ 25 | FLUTTER_EPHEMERAL_DIR="$(abspath flutter/ephemeral)" 26 | -------------------------------------------------------------------------------- /linux/flutter_embedder_example.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #include 23 | 24 | namespace { 25 | 26 | // Returns the path of the directory containing this executable, or an empty 27 | // string if the directory cannot be found. 28 | std::string GetExecutableDirectory() { 29 | char buffer[PATH_MAX + 1]; 30 | ssize_t length = readlink("/proc/self/exe", buffer, sizeof(buffer)); 31 | if (length > PATH_MAX) { 32 | std::cerr << "Couldn't locate executable" << std::endl; 33 | return ""; 34 | } 35 | std::string executable_path(buffer, length); 36 | size_t last_separator_position = executable_path.find_last_of('/'); 37 | if (last_separator_position == std::string::npos) { 38 | std::cerr << "Unabled to find parent directory of " << executable_path 39 | << std::endl; 40 | return ""; 41 | } 42 | return executable_path.substr(0, last_separator_position); 43 | } 44 | 45 | } // namespace 46 | 47 | int main(int argc, char **argv) { 48 | // Resources are located relative to the executable. 49 | std::string base_directory = GetExecutableDirectory(); 50 | if (base_directory.empty()) { 51 | base_directory = "."; 52 | } 53 | std::string data_directory = base_directory + "/data"; 54 | std::string assets_path = data_directory + "/flutter_assets"; 55 | std::string icu_data_path = data_directory + "/icudtl.dat"; 56 | 57 | // Arguments for the Flutter Engine. 58 | std::vector arguments; 59 | #ifdef NDEBUG 60 | arguments.push_back("--disable-dart-asserts"); 61 | #endif 62 | 63 | flutter::FlutterWindowController flutter_controller(icu_data_path); 64 | 65 | // Start the engine. 66 | if (!flutter_controller.CreateWindow(800, 600, "Flutter Desktop Example", 67 | assets_path, arguments)) { 68 | return EXIT_FAILURE; 69 | } 70 | 71 | // Run until the window is closed. 72 | flutter_controller.RunEventLoop(); 73 | return EXIT_SUCCESS; 74 | } 75 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "flutter/generated_plugin_registrant.h" 11 | #include "window_configuration.h" 12 | 13 | namespace { 14 | 15 | // Returns the path of the directory containing this executable, or an empty 16 | // string if the directory cannot be found. 17 | std::string GetExecutableDirectory() { 18 | char buffer[PATH_MAX + 1]; 19 | ssize_t length = readlink("/proc/self/exe", buffer, sizeof(buffer)); 20 | if (length > PATH_MAX) { 21 | std::cerr << "Couldn't locate executable" << std::endl; 22 | return ""; 23 | } 24 | std::string executable_path(buffer, length); 25 | size_t last_separator_position = executable_path.find_last_of('/'); 26 | if (last_separator_position == std::string::npos) { 27 | std::cerr << "Unabled to find parent directory of " << executable_path 28 | << std::endl; 29 | return ""; 30 | } 31 | return executable_path.substr(0, last_separator_position); 32 | } 33 | 34 | } // namespace 35 | 36 | int main(int argc, char **argv) { 37 | // Resources are located relative to the executable. 38 | std::string base_directory = GetExecutableDirectory(); 39 | if (base_directory.empty()) { 40 | base_directory = "."; 41 | } 42 | std::string data_directory = base_directory + "/data"; 43 | std::string assets_path = data_directory + "/flutter_assets"; 44 | std::string icu_data_path = data_directory + "/icudtl.dat"; 45 | 46 | // Arguments for the Flutter Engine. 47 | std::vector arguments; 48 | 49 | flutter::FlutterWindowController flutter_controller(icu_data_path); 50 | flutter::WindowProperties window_properties = {}; 51 | window_properties.title = kFlutterWindowTitle; 52 | window_properties.width = kFlutterWindowWidth; 53 | window_properties.height = kFlutterWindowHeight; 54 | 55 | // Start the engine. 56 | if (!flutter_controller.CreateWindow(window_properties, assets_path, 57 | arguments)) { 58 | return EXIT_FAILURE; 59 | } 60 | RegisterPlugins(&flutter_controller); 61 | 62 | // Run until the window is closed. 63 | while (flutter_controller.RunEventLoopWithTimeout( 64 | std::chrono::milliseconds::max())) { 65 | } 66 | return EXIT_SUCCESS; 67 | } 68 | -------------------------------------------------------------------------------- /linux/name_output.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright 2019 Google LLC 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # This script outputs the path to the executable that is created by 18 | # build.sh for the given configuration ("debug" or "release"). 19 | # 20 | # Having this file in this location, with this name, enables the current 21 | # experimental 'flutter run' support for desktop. 22 | 23 | # Arguments 24 | readonly flutter_config="$1" 25 | 26 | # Directories 27 | readonly base_dir="$(dirname "$0")" 28 | readonly flutter_app_dir="${base_dir}/.." 29 | # This must match the paths in the Makefile. 30 | readonly products_dir="${flutter_app_dir}/build/linux" 31 | 32 | echo "${products_dir}/${flutter_config}/flutter_desktop_example" 33 | -------------------------------------------------------------------------------- /linux/window_configuration.cc: -------------------------------------------------------------------------------- 1 | #include "window_configuration.h" 2 | 3 | const char *kFlutterWindowTitle = "flutter_everywhere"; 4 | const unsigned int kFlutterWindowWidth = 800; 5 | const unsigned int kFlutterWindowHeight = 600; 6 | -------------------------------------------------------------------------------- /linux/window_configuration.h: -------------------------------------------------------------------------------- 1 | #ifndef WINDOW_CONFIGURATION_ 2 | #define WINDOW_CONFIGURATION_ 3 | 4 | // This is a temporary approach to isolate common customizations from main.cpp, 5 | // where the APIs are still in flux. This should simplify re-creating the 6 | // runner while preserving local changes. 7 | // 8 | // Longer term there should be simpler configuration options for common 9 | // customizations like this, without requiring native code changes. 10 | 11 | extern const char *kFlutterWindowTitle; 12 | extern const unsigned int kFlutterWindowWidth; 13 | extern const unsigned int kFlutterWindowHeight; 14 | 15 | #endif // WINDOW_CONFIGURATION_ 16 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/xcuserdata/ 7 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | 9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 10 | } 11 | -------------------------------------------------------------------------------- /macos/Flutter/ephemeral/Flutter-Generated.xcconfig: -------------------------------------------------------------------------------- 1 | // This is a generated file; do not edit or check into version control. 2 | FLUTTER_ROOT=/usr/local/Caskroom/flutter/1.2.1/flutter 3 | FLUTTER_APPLICATION_PATH=/Users/rodydavis/Developer/GitHub/templates/flutter_everywhere 4 | FLUTTER_BUILD_DIR=build 5 | FLUTTER_FRAMEWORK_DIR=/usr/local/Caskroom/flutter/1.2.1/flutter/bin/cache/artifacts/engine/darwin-x64 6 | FLUTTER_BUILD_NAME=1.0.2 7 | FLUTTER_BUILD_NUMBER=1.0.2 8 | -------------------------------------------------------------------------------- /macos/Flutter/ephemeral/flutter_export_environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a generated file; do not edit or check into version control. 3 | export "FLUTTER_ROOT=/usr/local/Caskroom/flutter/1.2.1/flutter" 4 | export "FLUTTER_APPLICATION_PATH=/Users/rodydavis/Developer/GitHub/templates/flutter_everywhere" 5 | export "FLUTTER_BUILD_DIR=build" 6 | export "FLUTTER_FRAMEWORK_DIR=/usr/local/Caskroom/flutter/1.2.1/flutter/bin/cache/artifacts/engine/darwin-x64" 7 | export "FLUTTER_BUILD_NAME=1.0.2" 8 | export "FLUTTER_BUILD_NUMBER=1.0.2" 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = flutter_everywhere 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterEverywhere 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2020 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Flutter Everywhere", 3 | "version": "1.0", 4 | "description": "Flutter on Google Chrome Extensions", 5 | "permissions": [ 6 | "activeTab", 7 | "declarativeContent", 8 | "storage" 9 | ], 10 | "background": { 11 | "scripts": [ 12 | "background.js" 13 | ], 14 | "persistent": false 15 | }, 16 | "page_action": { 17 | "default_popup": "build/web/index.html", 18 | "default_icon": { 19 | "16": "assets/images/icon/get_started16.png", 20 | "32": "assets/images/icon/get_started32.png", 21 | "48": "assets/images/icon/get_started48.png", 22 | "128": "assets/images/icon/get_started128.png" 23 | } 24 | }, 25 | "icons": { 26 | "16": "assets/images/icon/get_started16.png", 27 | "32": "assets/images/icon/get_started32.png", 28 | "48": "assets/images/icon/get_started48.png", 29 | "128": "assets/images/icon/get_started128.png" 30 | }, 31 | "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'", 32 | "manifest_version": 2 33 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flutter_everywhere", 3 | "version": "1.0.0", 4 | "description": "A minimal example of Flutter running everywhere", 5 | "main": "debug.js", 6 | "scripts": { 7 | "build": "webdev build", 8 | "web_server_js": "flutter run --web-port 8080 -d web-server", 9 | "web_server_skia": "flutter run --release --dart-define=FLUTTER_WEB_USE_SKIA=true --web-port 8080 -d web-server", 10 | "build_runner_serve": "pub run build_runner serve --hot-reload", 11 | "dev": "run-p \"web_server_js\" \"start\"", 12 | "dev_skia": "run-p \"web_server_skia\" \"start\"", 13 | "start": "electron ." 14 | }, 15 | "repository": "https://github.com/ /electron-quick-start", 16 | "author": "GitHub", 17 | "license": "MIT", 18 | "devDependencies": { 19 | "electron": "^7.2.4", 20 | "npm-run-all": "^4.1.5" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.4.1" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.0.0" 18 | charcode: 19 | dependency: transitive 20 | description: 21 | name: charcode 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.3" 25 | collection: 26 | dependency: transitive 27 | description: 28 | name: collection 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.14.12" 32 | cupertino_icons: 33 | dependency: "direct main" 34 | description: 35 | name: cupertino_icons 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "0.1.2" 39 | flutter: 40 | dependency: "direct main" 41 | description: flutter 42 | source: sdk 43 | version: "0.0.0" 44 | flutter_test: 45 | dependency: "direct dev" 46 | description: flutter 47 | source: sdk 48 | version: "0.0.0" 49 | http_parser: 50 | dependency: transitive 51 | description: 52 | name: http_parser 53 | url: "https://pub.dartlang.org" 54 | source: hosted 55 | version: "3.1.3" 56 | matcher: 57 | dependency: transitive 58 | description: 59 | name: matcher 60 | url: "https://pub.dartlang.org" 61 | source: hosted 62 | version: "0.12.6" 63 | meta: 64 | dependency: transitive 65 | description: 66 | name: meta 67 | url: "https://pub.dartlang.org" 68 | source: hosted 69 | version: "1.1.8" 70 | path: 71 | dependency: transitive 72 | description: 73 | name: path 74 | url: "https://pub.dartlang.org" 75 | source: hosted 76 | version: "1.6.4" 77 | quiver: 78 | dependency: transitive 79 | description: 80 | name: quiver 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "2.1.3" 84 | shelf: 85 | dependency: "direct main" 86 | description: 87 | name: shelf 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "0.7.5" 91 | sky_engine: 92 | dependency: transitive 93 | description: flutter 94 | source: sdk 95 | version: "0.0.99" 96 | source_span: 97 | dependency: transitive 98 | description: 99 | name: source_span 100 | url: "https://pub.dartlang.org" 101 | source: hosted 102 | version: "1.7.0" 103 | stack_trace: 104 | dependency: transitive 105 | description: 106 | name: stack_trace 107 | url: "https://pub.dartlang.org" 108 | source: hosted 109 | version: "1.9.3" 110 | stream_channel: 111 | dependency: transitive 112 | description: 113 | name: stream_channel 114 | url: "https://pub.dartlang.org" 115 | source: hosted 116 | version: "2.0.0" 117 | string_scanner: 118 | dependency: transitive 119 | description: 120 | name: string_scanner 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "1.0.5" 124 | term_glyph: 125 | dependency: transitive 126 | description: 127 | name: term_glyph 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "1.1.0" 131 | test_api: 132 | dependency: transitive 133 | description: 134 | name: test_api 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "0.2.15" 138 | typed_data: 139 | dependency: transitive 140 | description: 141 | name: typed_data 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.1.6" 145 | vector_math: 146 | dependency: transitive 147 | description: 148 | name: vector_math 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "2.0.8" 152 | sdks: 153 | dart: ">=2.6.0 <3.0.0" 154 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_everywhere 2 | description: Mobile, Web, Desktop, Server, CLI 3 | version: 1.0.2 4 | 5 | environment: 6 | sdk: ">=2.1.0 <3.0.0" 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | shelf: ^0.7.5 12 | 13 | cupertino_icons: ^0.1.2 14 | 15 | dev_dependencies: 16 | flutter_test: 17 | sdk: flutter 18 | 19 | flutter: 20 | assets: 21 | - assets/images/ 22 | - assets/fonts/google_fonts/ 23 | - assets/fonts/google_fonts.json 24 | 25 | uses-material-design: true 26 | fonts: 27 | - family: GalleryIcons 28 | fonts: 29 | - asset: assets/fonts/GalleryIcons.ttf 30 | - family: MaterialIcons 31 | fonts: 32 | - asset: assets/fonts/MaterialIcons-Regular.ttf 33 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_everywhere/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | flutter_everywhere 22 | 23 | 24 | 25 | 28 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /web/main.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | import 'package:flutter_everywhere/main.dart' as app; 5 | 6 | main() async { 7 | app.main(); 8 | } 9 | -------------------------------------------------------------------------------- /web/main.js: -------------------------------------------------------------------------------- 1 | // Modules to control application life and create native browser window 2 | const { app, BrowserWindow } = require('electron') 3 | const path = require('path') 4 | 5 | // Keep a global reference of the window object, if you don't, the window will 6 | // be closed automatically when the JavaScript object is garbage collected. 7 | let mainWindow 8 | 9 | function createWindow() { 10 | // Create the browser window. 11 | mainWindow = new BrowserWindow({ 12 | width: 800, 13 | height: 600, 14 | webPreferences: { 15 | preload: path.join(__dirname, 'preload.js') 16 | } 17 | }) 18 | 19 | // and load the index.html of the app. 20 | mainWindow.loadFile('index.html') 21 | 22 | // Open the DevTools. 23 | // mainWindow.webContents.openDevTools() 24 | 25 | // Emitted when the window is closed. 26 | mainWindow.on('closed', function () { 27 | // Dereference the window object, usually you would store windows 28 | // in an array if your app supports multi windows, this is the time 29 | // when you should delete the corresponding element. 30 | mainWindow = null 31 | }) 32 | } 33 | 34 | // This method will be called when Electron has finished 35 | // initialization and is ready to create browser windows. 36 | // Some APIs can only be used after this event occurs. 37 | app.on('ready', createWindow) 38 | 39 | // Quit when all windows are closed. 40 | app.on('window-all-closed', function () { 41 | // On macOS it is common for applications and their menu bar 42 | // to stay active until the user quits explicitly with Cmd + Q 43 | if (process.platform !== 'darwin') app.quit() 44 | }) 45 | 46 | app.on('activate', function () { 47 | // On macOS it's common to re-create a window in the app when the 48 | // dock icon is clicked and there are no other windows open. 49 | if (mainWindow === null) createWindow() 50 | }) 51 | 52 | // In this file you can include the rest of your app's specific main process 53 | // code. You can also put them in separate files and require them here. 54 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flutter_everywhere", 3 | "short_name": "flutter_everywhere", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "app", 3 | "productName": "Flutter App", 4 | "description": "", 5 | "version": "1.0.0", 6 | "main": "main.js", 7 | "scripts": { 8 | "build": "electron-packager .", 9 | "package": "electron-packager . --all", 10 | "start": "electron ." 11 | }, 12 | "devDependencies": { 13 | "electron": "^6.0.1", 14 | "electron-packager": "^14.0.4" 15 | } 16 | } -------------------------------------------------------------------------------- /web/preload.js: -------------------------------------------------------------------------------- 1 | // All of the Node.js APIs are available in the preload process. 2 | // It has the same sandbox as a Chrome extension. 3 | window.addEventListener('DOMContentLoaded', () => { 4 | const replaceText = (selector, text) => { 5 | const element = document.getElementById(selector) 6 | if (element) element.innerText = text 7 | } 8 | 9 | for (const type of ['chrome', 'node', 'electron']) { 10 | replaceText(`${type}-version`, process.versions[type]) 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /windows/AppConfiguration.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | flutter_everywhere 5 | 6 | 7 | -------------------------------------------------------------------------------- /windows/FlutterBuild.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | x64 7 | 8 | 9 | Profile 10 | x64 11 | 12 | 13 | Release 14 | x64 15 | 16 | 17 | 18 | 15.0 19 | {6419BF13-6ECD-4CD2-9E85-E566A1F03F8F} 20 | Flutter Build 21 | 10.0 22 | 23 | 24 | 25 | v141 26 | v142 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | "$(ProjectDir)scripts\prepare_dependencies" $(Configuration) 41 | Running Flutter backend build 42 | force_to_run_every_time 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /windows/Runner.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29709.97 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Runner", "Runner.vcxproj", "{5A827760-CF8B-408A-99A3-B6C0AD2271E7}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {6419BF13-6ECD-4CD2-9E85-E566A1F03F8F} = {6419BF13-6ECD-4CD2-9E85-E566A1F03F8F} 9 | EndProjectSection 10 | EndProject 11 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Flutter Build", "FlutterBuild.vcxproj", "{6419BF13-6ECD-4CD2-9E85-E566A1F03F8F}" 12 | EndProject 13 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Flutter Plugins", "Flutter Plugins", "{5C2E738A-1DD3-445A-AAC8-EEB9648DD07C}" 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|x64 = Debug|x64 18 | Profile|x64 = Profile|x64 19 | Release|x64 = Release|x64 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {5A827760-CF8B-408A-99A3-B6C0AD2271E7}.Debug|x64.ActiveCfg = Debug|x64 23 | {5A827760-CF8B-408A-99A3-B6C0AD2271E7}.Debug|x64.Build.0 = Debug|x64 24 | {5A827760-CF8B-408A-99A3-B6C0AD2271E7}.Profile|x64.ActiveCfg = Profile|x64 25 | {5A827760-CF8B-408A-99A3-B6C0AD2271E7}.Profile|x64.Build.0 = Profile|x64 26 | {5A827760-CF8B-408A-99A3-B6C0AD2271E7}.Release|x64.ActiveCfg = Release|x64 27 | {5A827760-CF8B-408A-99A3-B6C0AD2271E7}.Release|x64.Build.0 = Release|x64 28 | {6419BF13-6ECD-4CD2-9E85-E566A1F03F8F}.Debug|x64.ActiveCfg = Debug|x64 29 | {6419BF13-6ECD-4CD2-9E85-E566A1F03F8F}.Debug|x64.Build.0 = Debug|x64 30 | {6419BF13-6ECD-4CD2-9E85-E566A1F03F8F}.Profile|x64.ActiveCfg = Profile|x64 31 | {6419BF13-6ECD-4CD2-9E85-E566A1F03F8F}.Profile|x64.Build.0 = Profile|x64 32 | {6419BF13-6ECD-4CD2-9E85-E566A1F03F8F}.Release|x64.ActiveCfg = Release|x64 33 | {6419BF13-6ECD-4CD2-9E85-E566A1F03F8F}.Release|x64.Build.0 = Release|x64 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | SolutionGuid = {B8A69CB0-A974-4774-9EBD-1E5EECACD186} 40 | EndGlobalSection 41 | GlobalSection(NestedProjects) = preSolution 42 | EndGlobalSection 43 | EndGlobal -------------------------------------------------------------------------------- /windows/Runner.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | x64 7 | 8 | 9 | Profile 10 | x64 11 | 12 | 13 | Release 14 | x64 15 | 16 | 17 | 18 | 15.0 19 | {5A827760-CF8B-408A-99A3-B6C0AD2271E7} 20 | flutter_everywhere 21 | 10.0 22 | 23 | 24 | 25 | Application 26 | true 27 | v141 28 | v142 29 | Unicode 30 | 31 | 32 | Application 33 | false 34 | v141 35 | v142 36 | true 37 | Unicode 38 | 39 | 40 | Application 41 | false 42 | v141 43 | v142 44 | true 45 | Unicode 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | $(ProjectDir)..\build\windows\$(Platform)\$(Configuration)\$(ProjectName)\ 73 | $(ProjectDir)..\build\windows\intermediates\$(Platform)\$(Configuration)\$(ProjectName)\ 74 | 75 | 76 | $(ProjectDir)..\build\windows\$(Platform)\$(Configuration)\$(ProjectName)\ 77 | $(ProjectDir)..\build\windows\intermediates\$(Platform)\$(Configuration)\$(ProjectName)\ 78 | 79 | 80 | $(ProjectDir)..\build\windows\$(Platform)\$(Configuration)\$(ProjectName)\ 81 | $(ProjectDir)..\build\windows\intermediates\$(Platform)\$(Configuration)\$(ProjectName)\ 82 | 83 | 84 | 85 | Level4 86 | Disabled 87 | true 88 | true 89 | $(ProjectDir);$(FLUTTER_EPHEMERAL_DIR);$(FLUTTER_EPHEMERAL_DIR)\cpp_client_wrapper\include;%(AdditionalIncludeDirectories) 90 | _MBCS;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) 91 | true 92 | 4100 93 | 94 | 95 | flutter_windows.dll.lib;%(AdditionalDependencies) 96 | $(FLUTTER_EPHEMERAL_DIR);$(OutDir)..\Plugins;%(AdditionalLibraryDirectories) 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | "$(ProjectDir)scripts\bundle_assets_and_deps" "$(FLUTTER_EPHEMERAL_DIR)\" "$(OutputPath)" "$(OutputPath)..\Plugins\" "$(TargetFileName)" 120 | 121 | 122 | Bundling dependencies 123 | Dummy_Run_Always 124 | 125 | 126 | 127 | 128 | 129 | 130 | Level4 131 | MaxSpeed 132 | true 133 | true 134 | true 135 | true 136 | $(ProjectDir);$(FLUTTER_EPHEMERAL_DIR);$(FLUTTER_EPHEMERAL_DIR)\cpp_client_wrapper\include;%(AdditionalIncludeDirectories) 137 | _MBCS;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) 138 | true 139 | 4100 140 | 141 | 142 | true 143 | true 144 | flutter_windows.dll.lib;%(AdditionalDependencies) 145 | $(FLUTTER_EPHEMERAL_DIR);$(OutDir)..\Plugins;%(AdditionalLibraryDirectories) 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | "$(ProjectDir)scripts\bundle_assets_and_deps" "$(FLUTTER_EPHEMERAL_DIR)\" "$(OutputPath)" "$(OutputPath)..\Plugins\" "$(TargetFileName)" 169 | 170 | 171 | Bundling dependencies 172 | Dummy_Run_Always 173 | 174 | 175 | 176 | 177 | 178 | 179 | Level4 180 | MaxSpeed 181 | true 182 | true 183 | true 184 | true 185 | $(ProjectDir);$(FLUTTER_EPHEMERAL_DIR);$(FLUTTER_EPHEMERAL_DIR)\cpp_client_wrapper\include;%(AdditionalIncludeDirectories) 186 | _MBCS;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) 187 | true 188 | 4100 189 | 190 | 191 | true 192 | true 193 | flutter_windows.dll.lib;%(AdditionalDependencies) 194 | $(FLUTTER_EPHEMERAL_DIR);$(OutDir)..\Plugins;%(AdditionalLibraryDirectories) 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | "$(ProjectDir)scripts\bundle_assets_and_deps" "$(FLUTTER_EPHEMERAL_DIR)\" "$(OutputPath)" "$(OutputPath)..\Plugins\" "$(TargetFileName)" 218 | 219 | 220 | Bundling dependencies 221 | Dummy_Run_Always 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | $(SolutionDir) 259 | 260 | 261 | -------------------------------------------------------------------------------- /windows/Runner.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {2761a4b5-57b2-4d50-a677-d20ddc17a7f1} 18 | 19 | 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | Source Files\Client Wrapper 41 | 42 | 43 | Source Files\Client Wrapper 44 | 45 | 46 | Source Files\Client Wrapper 47 | 48 | 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | Header Files 58 | 59 | 60 | Header Files 61 | 62 | 63 | Header Files 64 | 65 | 66 | Header Files 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | Resource Files 75 | 76 | 77 | 78 | 79 | Resource Files 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /windows/flutter/.template_version: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /windows/flutter/GeneratedPlugins.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #include "generated_plugin_registrant.h" 6 | 7 | 8 | void RegisterPlugins(flutter::PluginRegistry* registry) { 9 | } 10 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 6 | #define GENERATED_PLUGIN_REGISTRANT_ 7 | 8 | #include 9 | 10 | // Registers Flutter plugins. 11 | void RegisterPlugins(flutter::PluginRegistry* registry); 12 | 13 | #endif // GENERATED_PLUGIN_REGISTRANT_ 14 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | #endif // English (United States) resources 58 | ///////////////////////////////////////////////////////////////////////////// 59 | 60 | 61 | 62 | #ifndef APSTUDIO_INVOKED 63 | ///////////////////////////////////////////////////////////////////////////// 64 | // 65 | // Generated from the TEXTINCLUDE 3 resource. 66 | // 67 | 68 | 69 | ///////////////////////////////////////////////////////////////////////////// 70 | #endif // not APSTUDIO_INVOKED 71 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include "flutter/generated_plugin_registrant.h" 4 | 5 | FlutterWindow::FlutterWindow(RunLoop* run_loop, 6 | const flutter::DartProject& project) 7 | : run_loop_(run_loop), project_(project) {} 8 | 9 | FlutterWindow::~FlutterWindow() {} 10 | 11 | void FlutterWindow::OnCreate() { 12 | Win32Window::OnCreate(); 13 | 14 | // The size here is arbitrary since SetChildContent will resize it. 15 | flutter_controller_ = 16 | std::make_unique(100, 100, project_); 17 | RegisterPlugins(flutter_controller_.get()); 18 | run_loop_->RegisterFlutterInstance(flutter_controller_.get()); 19 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 20 | } 21 | 22 | void FlutterWindow::OnDestroy() { 23 | if (flutter_controller_) { 24 | run_loop_->UnregisterFlutterInstance(flutter_controller_.get()); 25 | flutter_controller_ = nullptr; 26 | } 27 | 28 | Win32Window::OnDestroy(); 29 | } 30 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_WINDOW_H_ 2 | #define FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include "run_loop.h" 8 | #include "win32_window.h" 9 | 10 | #include 11 | 12 | // A window that does nothing but host a Flutter view. 13 | class FlutterWindow : public Win32Window { 14 | public: 15 | // Creates a new FlutterWindow driven by the |run_loop|, hosting a 16 | // Flutter view running |project|. 17 | explicit FlutterWindow(RunLoop* run_loop, 18 | const flutter::DartProject& project); 19 | virtual ~FlutterWindow(); 20 | 21 | protected: 22 | // Win32Window: 23 | void OnCreate() override; 24 | void OnDestroy() override; 25 | 26 | private: 27 | // The run loop driving events for this window. 28 | RunLoop* run_loop_; 29 | 30 | // The project to run. 31 | flutter::DartProject project_; 32 | 33 | // The Flutter instance hosted by this window. 34 | std::unique_ptr flutter_controller_; 35 | }; 36 | 37 | #endif // FLUTTER_WINDOW_H_ 38 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "run_loop.h" 7 | #include "window_configuration.h" 8 | 9 | int APIENTRY wWinMain(_In_ HINSTANCE instance, 10 | _In_opt_ HINSTANCE prev, 11 | _In_ wchar_t* command_line, 12 | _In_ int show_command) { 13 | // Attach to console when present (e.g., 'flutter run') or create a 14 | // new console when running with a debugger. 15 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 16 | ::AllocConsole(); 17 | } 18 | 19 | RunLoop run_loop; 20 | 21 | flutter::DartProject project(L"data"); 22 | FlutterWindow window(&run_loop, project); 23 | Win32Window::Point origin(kFlutterWindowOriginX, kFlutterWindowOriginY); 24 | Win32Window::Size size(kFlutterWindowWidth, kFlutterWindowHeight); 25 | if (!window.CreateAndShow(kFlutterWindowTitle, origin, size)) { 26 | return EXIT_FAILURE; 27 | } 28 | window.SetQuitOnClose(true); 29 | 30 | run_loop.Run(); 31 | 32 | return EXIT_SUCCESS; 33 | } 34 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodydavis/flutter_everywhere/036c185b138c4acf3a8f85223ed1ac7147be3e8d/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /windows/runner/run_loop.cpp: -------------------------------------------------------------------------------- 1 | #include "run_loop.h" 2 | 3 | #include 4 | // Don't stomp std::min/std::max 5 | #undef max 6 | #undef min 7 | 8 | #include 9 | 10 | RunLoop::RunLoop() {} 11 | 12 | RunLoop::~RunLoop() {} 13 | 14 | void RunLoop::Run() { 15 | bool keep_running = true; 16 | TimePoint next_flutter_event_time = TimePoint::clock::now(); 17 | while (keep_running) { 18 | std::chrono::nanoseconds wait_duration = 19 | std::max(std::chrono::nanoseconds(0), 20 | next_flutter_event_time - TimePoint::clock::now()); 21 | ::MsgWaitForMultipleObjects( 22 | 0, nullptr, FALSE, static_cast(wait_duration.count() / 1000), 23 | QS_ALLINPUT); 24 | bool processed_events = false; 25 | MSG message; 26 | // All pending Windows messages must be processed; MsgWaitForMultipleObjects 27 | // won't return again for items left in the queue after PeekMessage. 28 | while (::PeekMessage(&message, nullptr, 0, 0, PM_REMOVE)) { 29 | processed_events = true; 30 | if (message.message == WM_QUIT) { 31 | keep_running = false; 32 | break; 33 | } 34 | ::TranslateMessage(&message); 35 | ::DispatchMessage(&message); 36 | // Allow Flutter to process messages each time a Windows message is 37 | // processed, to prevent starvation. 38 | next_flutter_event_time = 39 | std::min(next_flutter_event_time, ProcessFlutterMessages()); 40 | } 41 | // If the PeekMessage loop didn't run, process Flutter messages. 42 | if (!processed_events) { 43 | next_flutter_event_time = 44 | std::min(next_flutter_event_time, ProcessFlutterMessages()); 45 | } 46 | } 47 | } 48 | 49 | void RunLoop::RegisterFlutterInstance( 50 | flutter::FlutterViewController* flutter_instance) { 51 | flutter_instances_.insert(flutter_instance); 52 | } 53 | 54 | void RunLoop::UnregisterFlutterInstance( 55 | flutter::FlutterViewController* flutter_instance) { 56 | flutter_instances_.erase(flutter_instance); 57 | } 58 | 59 | RunLoop::TimePoint RunLoop::ProcessFlutterMessages() { 60 | TimePoint next_event_time = TimePoint::max(); 61 | for (auto flutter_controller : flutter_instances_) { 62 | std::chrono::nanoseconds wait_duration = 63 | flutter_controller->ProcessMessages(); 64 | if (wait_duration != std::chrono::nanoseconds::max()) { 65 | next_event_time = 66 | std::min(next_event_time, TimePoint::clock::now() + wait_duration); 67 | } 68 | } 69 | return next_event_time; 70 | } 71 | -------------------------------------------------------------------------------- /windows/runner/run_loop.h: -------------------------------------------------------------------------------- 1 | #ifndef RUN_LOOP_H_ 2 | #define RUN_LOOP_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | // A runloop that will service events for Flutter instances as well 10 | // as native messages. 11 | class RunLoop { 12 | public: 13 | RunLoop(); 14 | ~RunLoop(); 15 | 16 | // Prevent copying 17 | RunLoop(RunLoop const&) = delete; 18 | RunLoop& operator=(RunLoop const&) = delete; 19 | 20 | // Runs the run loop until the application quits. 21 | void Run(); 22 | 23 | // Registers the given Flutter instance for event servicing. 24 | void RegisterFlutterInstance( 25 | flutter::FlutterViewController* flutter_instance); 26 | 27 | // Unregisters the given Flutter instance from event servicing. 28 | void UnregisterFlutterInstance( 29 | flutter::FlutterViewController* flutter_instance); 30 | 31 | private: 32 | using TimePoint = std::chrono::steady_clock::time_point; 33 | 34 | // Processes all currently pending messages for registered Flutter instances. 35 | TimePoint ProcessFlutterMessages(); 36 | 37 | std::set flutter_instances_; 38 | }; 39 | 40 | #endif // RUN_LOOP_H_ 41 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /windows/runner/win32_window.cpp: -------------------------------------------------------------------------------- 1 | #include "win32_window.h" 2 | 3 | #include 4 | 5 | #include "resource.h" 6 | 7 | namespace { 8 | 9 | constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; 10 | 11 | // The number of Win32Window objects that currently exist. 12 | static int g_active_window_count = 0; 13 | 14 | using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); 15 | 16 | // Scale helper to convert logical scaler values to physical using passed in 17 | // scale factor 18 | int Scale(int source, double scale_factor) { 19 | return static_cast(source * scale_factor); 20 | } 21 | 22 | // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. 23 | // This API is only needed for PerMonitor V1 awareness mode. 24 | void EnableFullDpiSupportIfAvailable(HWND hwnd) { 25 | HMODULE user32_module = LoadLibraryA("User32.dll"); 26 | if (!user32_module) { 27 | return; 28 | } 29 | auto enable_non_client_dpi_scaling = 30 | reinterpret_cast( 31 | GetProcAddress(user32_module, "EnableNonClientDpiScaling")); 32 | if (enable_non_client_dpi_scaling != nullptr) { 33 | enable_non_client_dpi_scaling(hwnd); 34 | FreeLibrary(user32_module); 35 | } 36 | } 37 | 38 | } // namespace 39 | 40 | // Manages the Win32Window's window class registration. 41 | class WindowClassRegistrar { 42 | public: 43 | ~WindowClassRegistrar() = default; 44 | 45 | // Returns the singleton registar instance. 46 | static WindowClassRegistrar* GetInstance() { 47 | if (!instance_) { 48 | instance_ = new WindowClassRegistrar(); 49 | } 50 | return instance_; 51 | } 52 | 53 | // Returns the name of the window class, registering the class if it hasn't 54 | // previously been registered. 55 | const wchar_t* GetWindowClass(); 56 | 57 | // Unregisters the window class. Should only be called if there are no 58 | // instances of the window. 59 | void UnregisterWindowClass(); 60 | 61 | private: 62 | WindowClassRegistrar() = default; 63 | 64 | static WindowClassRegistrar* instance_; 65 | 66 | bool class_registered_ = false; 67 | }; 68 | 69 | WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; 70 | 71 | const wchar_t* WindowClassRegistrar::GetWindowClass() { 72 | if (!class_registered_) { 73 | WNDCLASS window_class{}; 74 | window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); 75 | window_class.lpszClassName = kWindowClassName; 76 | window_class.style = CS_HREDRAW | CS_VREDRAW; 77 | window_class.cbClsExtra = 0; 78 | window_class.cbWndExtra = 0; 79 | window_class.hInstance = GetModuleHandle(nullptr); 80 | window_class.hIcon = 81 | LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); 82 | window_class.hbrBackground = 0; 83 | window_class.lpszMenuName = nullptr; 84 | window_class.lpfnWndProc = Win32Window::WndProc; 85 | RegisterClass(&window_class); 86 | class_registered_ = true; 87 | } 88 | return kWindowClassName; 89 | } 90 | 91 | void WindowClassRegistrar::UnregisterWindowClass() { 92 | UnregisterClass(kWindowClassName, nullptr); 93 | class_registered_ = false; 94 | } 95 | 96 | Win32Window::Win32Window() { 97 | ++g_active_window_count; 98 | } 99 | 100 | Win32Window::~Win32Window() { 101 | --g_active_window_count; 102 | Destroy(); 103 | } 104 | 105 | bool Win32Window::CreateAndShow(const std::wstring& title, 106 | const Point& origin, 107 | const Size& size) { 108 | Destroy(); 109 | 110 | const wchar_t* window_class = 111 | WindowClassRegistrar::GetInstance()->GetWindowClass(); 112 | 113 | const POINT target_point = {static_cast(origin.x), 114 | static_cast(origin.y)}; 115 | HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); 116 | UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); 117 | double scale_factor = dpi / 96.0; 118 | 119 | HWND window = CreateWindow( 120 | window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, 121 | Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), 122 | Scale(size.width, scale_factor), Scale(size.height, scale_factor), 123 | nullptr, nullptr, GetModuleHandle(nullptr), this); 124 | 125 | OnCreate(); 126 | 127 | return window != nullptr; 128 | } 129 | 130 | // static 131 | LRESULT CALLBACK Win32Window::WndProc(HWND const window, 132 | UINT const message, 133 | WPARAM const wparam, 134 | LPARAM const lparam) noexcept { 135 | if (message == WM_NCCREATE) { 136 | auto window_struct = reinterpret_cast(lparam); 137 | SetWindowLongPtr(window, GWLP_USERDATA, 138 | reinterpret_cast(window_struct->lpCreateParams)); 139 | 140 | auto that = static_cast(window_struct->lpCreateParams); 141 | EnableFullDpiSupportIfAvailable(window); 142 | that->window_handle_ = window; 143 | } else if (Win32Window* that = GetThisFromHandle(window)) { 144 | return that->MessageHandler(window, message, wparam, lparam); 145 | } 146 | 147 | return DefWindowProc(window, message, wparam, lparam); 148 | } 149 | 150 | LRESULT 151 | Win32Window::MessageHandler(HWND hwnd, 152 | UINT const message, 153 | WPARAM const wparam, 154 | LPARAM const lparam) noexcept { 155 | auto window = 156 | reinterpret_cast(GetWindowLongPtr(hwnd, GWLP_USERDATA)); 157 | 158 | if (window == nullptr) { 159 | return 0; 160 | } 161 | 162 | switch (message) { 163 | case WM_DESTROY: 164 | window_handle_ = nullptr; 165 | Destroy(); 166 | if (quit_on_close_) { 167 | PostQuitMessage(0); 168 | } 169 | return 0; 170 | 171 | case WM_DPICHANGED: { 172 | auto newRectSize = reinterpret_cast(lparam); 173 | LONG newWidth = newRectSize->right - newRectSize->left; 174 | LONG newHeight = newRectSize->bottom - newRectSize->top; 175 | 176 | SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, 177 | newHeight, SWP_NOZORDER | SWP_NOACTIVATE); 178 | 179 | return 0; 180 | } 181 | case WM_SIZE: 182 | RECT rect; 183 | GetClientRect(hwnd, &rect); 184 | if (child_content_ != nullptr) { 185 | // Size and position the child window. 186 | MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, 187 | rect.bottom - rect.top, TRUE); 188 | } 189 | return 0; 190 | 191 | case WM_ACTIVATE: 192 | if (child_content_ != nullptr) { 193 | SetFocus(child_content_); 194 | } 195 | return 0; 196 | 197 | // Messages that are directly forwarded to embedding. 198 | case WM_FONTCHANGE: 199 | SendMessage(child_content_, WM_FONTCHANGE, NULL, NULL); 200 | return 0; 201 | } 202 | 203 | return DefWindowProc(window_handle_, message, wparam, lparam); 204 | } 205 | 206 | void Win32Window::Destroy() { 207 | OnDestroy(); 208 | 209 | if (window_handle_) { 210 | DestroyWindow(window_handle_); 211 | window_handle_ = nullptr; 212 | } 213 | if (g_active_window_count == 0) { 214 | WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); 215 | } 216 | } 217 | 218 | Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { 219 | return reinterpret_cast( 220 | GetWindowLongPtr(window, GWLP_USERDATA)); 221 | } 222 | 223 | void Win32Window::SetChildContent(HWND content) { 224 | child_content_ = content; 225 | SetParent(content, window_handle_); 226 | RECT frame; 227 | GetClientRect(window_handle_, &frame); 228 | 229 | MoveWindow(content, frame.left, frame.top, frame.right - frame.left, 230 | frame.bottom - frame.top, true); 231 | 232 | SetFocus(child_content_); 233 | } 234 | 235 | HWND Win32Window::GetHandle() { 236 | return window_handle_; 237 | } 238 | 239 | void Win32Window::SetQuitOnClose(bool quit_on_close) { 240 | quit_on_close_ = quit_on_close; 241 | } 242 | 243 | void Win32Window::OnCreate() { 244 | // No-op; provided for subclasses. 245 | } 246 | 247 | void Win32Window::OnDestroy() { 248 | // No-op; provided for subclasses. 249 | } 250 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef WIN32_WINDOW_H_ 2 | #define WIN32_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 12 | // inherited from by classes that wish to specialize with custom 13 | // rendering and input handling 14 | class Win32Window { 15 | public: 16 | struct Point { 17 | unsigned int x; 18 | unsigned int y; 19 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 20 | }; 21 | 22 | struct Size { 23 | unsigned int width; 24 | unsigned int height; 25 | Size(unsigned int width, unsigned int height) 26 | : width(width), height(height) {} 27 | }; 28 | 29 | Win32Window(); 30 | virtual ~Win32Window(); 31 | 32 | // Creates and shows a win32 window with |title| and position and size using 33 | // |origin| and |size|. New windows are created on the default monitor. Window 34 | // sizes are specified to the OS in physical pixels, hence to ensure a 35 | // consistent size to will treat the width height passed in to this function 36 | // as logical pixels and scale to appropriate for the default monitor. Returns 37 | // true if the window was created successfully. 38 | bool CreateAndShow(const std::wstring& title, 39 | const Point& origin, 40 | const Size& size); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | protected: 56 | // Processes and route salient window messages for mouse handling, 57 | // size change and DPI. Delegates handling of these to member overloads that 58 | // inheriting classes can handle. 59 | virtual LRESULT MessageHandler(HWND window, 60 | UINT const message, 61 | WPARAM const wparam, 62 | LPARAM const lparam) noexcept; 63 | 64 | // Called when CreateAndShow is called, allowing subclass window-related 65 | // setup. 66 | virtual void OnCreate(); 67 | 68 | // Called when Destroy is called. 69 | virtual void OnDestroy(); 70 | 71 | private: 72 | friend class WindowClassRegistrar; 73 | 74 | // OS callback called by message pump. Handles the WM_NCCREATE message which 75 | // is passed when the non-client area is being created and enables automatic 76 | // non-client DPI scaling so that the non-client area automatically 77 | // responsponds to changes in DPI. All other messages are handled by 78 | // MessageHandler. 79 | static LRESULT CALLBACK WndProc(HWND const window, 80 | UINT const message, 81 | WPARAM const wparam, 82 | LPARAM const lparam) noexcept; 83 | 84 | // Retrieves a class instance pointer for |window| 85 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 86 | 87 | bool quit_on_close_ = false; 88 | 89 | // window handle for top level window. 90 | HWND window_handle_ = nullptr; 91 | 92 | // window handle for hosted content. 93 | HWND child_content_ = nullptr; 94 | }; 95 | 96 | #endif // WIN32_WINDOW_H_ 97 | -------------------------------------------------------------------------------- /windows/runner/window_configuration.cpp: -------------------------------------------------------------------------------- 1 | #include "window_configuration.h" 2 | 3 | const wchar_t* kFlutterWindowTitle = L"flutter_everywhere"; 4 | const unsigned int kFlutterWindowOriginX = 10; 5 | const unsigned int kFlutterWindowOriginY = 10; 6 | const unsigned int kFlutterWindowWidth = 800; 7 | const unsigned int kFlutterWindowHeight = 600; 8 | -------------------------------------------------------------------------------- /windows/runner/window_configuration.h: -------------------------------------------------------------------------------- 1 | #ifndef WINDOW_CONFIGURATION_ 2 | #define WINDOW_CONFIGURATION_ 3 | 4 | // This is a temporary approach to isolate changes that people are likely to 5 | // make to main.cpp, where the APIs are still in flux. This will reduce the 6 | // need to resolve conflicts or re-create changes slightly differently every 7 | // time the Windows Flutter API surface changes. 8 | // 9 | // Longer term there should be simpler configuration options for common 10 | // customizations like this, without requiring native code changes. 11 | 12 | extern const wchar_t* kFlutterWindowTitle; 13 | extern const unsigned int kFlutterWindowOriginX; 14 | extern const unsigned int kFlutterWindowOriginY; 15 | extern const unsigned int kFlutterWindowWidth; 16 | extern const unsigned int kFlutterWindowHeight; 17 | 18 | #endif // WINDOW_CONFIGURATION_ 19 | -------------------------------------------------------------------------------- /windows/scripts/bundle_assets_and_deps.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set FLUTTER_CACHE_DIR=%~1 4 | set BUNDLE_DIR=%~2 5 | set PLUGIN_DIR=%~3 6 | set EXE_NAME=%~4 7 | 8 | set DATA_DIR=%BUNDLE_DIR%data 9 | 10 | if not exist "%DATA_DIR%" call mkdir "%DATA_DIR%" 11 | if %errorlevel% neq 0 exit /b %errorlevel% 12 | 13 | :: Write the executable name to the location expected by the Flutter tool. 14 | echo %EXE_NAME%>"%FLUTTER_CACHE_DIR%exe_filename" 15 | 16 | :: Copy the Flutter assets to the data directory. 17 | set FLUTTER_APP_DIR=%~dp0..\.. 18 | set ASSET_DIR_NAME=flutter_assets 19 | set TARGET_ASSET_DIR=%DATA_DIR%\%ASSET_DIR_NAME% 20 | if exist "%TARGET_ASSET_DIR%" call rmdir /s /q "%TARGET_ASSET_DIR%" 21 | if %errorlevel% neq 0 exit /b %errorlevel% 22 | call xcopy /s /e /i /q "%FLUTTER_APP_DIR%\build\%ASSET_DIR_NAME%" "%TARGET_ASSET_DIR%" 23 | if %errorlevel% neq 0 exit /b %errorlevel% 24 | 25 | :: Copy the icudtl.dat file from the Flutter tree to the data directory. 26 | call xcopy /y /d /q "%FLUTTER_CACHE_DIR%icudtl.dat" "%DATA_DIR%" 27 | if %errorlevel% neq 0 exit /b %errorlevel% 28 | 29 | :: Copy the Flutter DLL to the target location. 30 | call xcopy /y /d /q "%FLUTTER_CACHE_DIR%flutter_windows.dll" "%BUNDLE_DIR%" 31 | if %errorlevel% neq 0 exit /b %errorlevel% 32 | 33 | :: Copy any Plugin DLLs to the target location. 34 | if exist "%PLUGIN_DIR%" ( 35 | call xcopy /y /d /q "%PLUGIN_DIR%"*.dll "%BUNDLE_DIR%" 36 | if %errorlevel% neq 0 exit /b %errorlevel% 37 | ) 38 | -------------------------------------------------------------------------------- /windows/scripts/prepare_dependencies.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: Run flutter tool backend. 4 | set BUILD_MODE=%~1 5 | "%FLUTTER_ROOT%\packages\flutter_tools\bin\tool_backend" windows-x64 %BUILD_MODE% 6 | --------------------------------------------------------------------------------