├── android
├── gradle.properties
├── app
│ ├── src
│ │ └── main
│ │ │ ├── res
│ │ │ ├── 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
│ │ │ └── drawable
│ │ │ │ └── launch_background.xml
│ │ │ ├── kotlin
│ │ │ └── de
│ │ │ │ └── jensklingenberg
│ │ │ │ └── jkflutter
│ │ │ │ ├── MainContract.kt
│ │ │ │ ├── MainPresenter.kt
│ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── build.gradle
├── ios
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── 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-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── Runner.xcodeproj
│ ├── project.xcworkspace
│ └── contents.xcworkspacedata
│ ├── xcshareddata
│ └── xcschemes
│ │ └── Runner.xcscheme
│ └── project.pbxproj
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── shared
├── src
│ ├── flutterMain
│ │ ├── main.dart
│ │ ├── model
│ │ │ └── post.dart
│ │ ├── ui
│ │ │ ├── main
│ │ │ │ ├── MainApp.dart
│ │ │ │ ├── MainDrawer.dart
│ │ │ │ └── MainPage.dart
│ │ │ ├── navigation
│ │ │ │ └── SecondRoute.dart
│ │ │ ├── list_view_example.dart
│ │ │ ├── toast
│ │ │ │ └── Home.dart
│ │ │ ├── platform_specific
│ │ │ │ └── BatterieLevel.dart
│ │ │ ├── login
│ │ │ │ └── LoginWidget.dart
│ │ │ ├── networkview.dart
│ │ │ ├── eventChannelSample
│ │ │ │ └── EventChannelSample.dart
│ │ │ └── search
│ │ │ │ └── SearchExample.dart
│ │ └── utils
│ │ │ └── MethodChannelHelper.dart
│ ├── commonTest
│ │ └── kotlin
│ │ │ └── sample
│ │ │ └── SampleTests.kt
│ ├── jvmTest
│ │ └── kotlin
│ │ │ └── sample
│ │ │ └── SampleTestsJVM.kt
│ ├── commonMain
│ │ └── kotlin
│ │ │ ├── de
│ │ │ └── jensklingenberg
│ │ │ │ └── jkflutter
│ │ │ │ └── channel
│ │ │ │ └── BatteryChannel.kt
│ │ │ └── sample
│ │ │ └── flutter.kt
│ ├── main
│ │ ├── kotlin
│ │ │ ├── Team.sq
│ │ │ └── Player.sq
│ │ └── sqldelight
│ │ │ └── de
│ │ │ └── jensklingenberg
│ │ │ └── jkflutter
│ │ │ └── db
│ │ │ ├── Team.sq
│ │ │ └── Player.sq
│ └── flutterTest
│ │ └── widget_test.dart
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── build.gradle
├── .metadata
├── local.properties
├── README.md
├── .gitignore
├── gradlew.bat
├── pubspec.yaml
└── gradlew
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foso/jk_flutter/master/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foso/jk_flutter/master/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foso/jk_flutter/master/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/shared/src/flutterMain/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'ui/main/MainApp.dart';
3 |
4 | void main() => runApp(MainApp());
5 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foso/jk_flutter/master/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foso/jk_flutter/master/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foso/jk_flutter/master/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foso/jk_flutter/master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foso/jk_flutter/master/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/Foso/jk_flutter/master/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/Foso/jk_flutter/master/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/Foso/jk_flutter/master/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/Foso/jk_flutter/master/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/Foso/jk_flutter/master/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/Foso/jk_flutter/master/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/Foso/jk_flutter/master/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/Foso/jk_flutter/master/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/Foso/jk_flutter/master/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/Foso/jk_flutter/master/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/Foso/jk_flutter/master/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/Foso/jk_flutter/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foso/jk_flutter/master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foso/jk_flutter/master/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foso/jk_flutter/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foso/jk_flutter/master/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/shared/src/commonTest/kotlin/sample/SampleTests.kt:
--------------------------------------------------------------------------------
1 | package sample
2 |
3 | import kotlin.test.Test
4 | import kotlin.test.assertTrue
5 |
6 | class SampleTests {
7 | @Test
8 | fun testMe() {
9 | assertTrue(Sample().checkMe() > 0)
10 | }
11 | }
--------------------------------------------------------------------------------
/shared/src/jvmTest/kotlin/sample/SampleTestsJVM.kt:
--------------------------------------------------------------------------------
1 | package sample
2 |
3 | import kotlin.test.Test
4 | import kotlin.test.assertTrue
5 |
6 | class SampleTestsJVM {
7 | @Test
8 | fun testHello() {
9 | assertTrue("JVM" in hello())
10 | }
11 | }
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/de/jensklingenberg/jkflutter/MainContract.kt:
--------------------------------------------------------------------------------
1 | package de.jensklingenberg.jkflutter
2 |
3 | interface MainContract{
4 |
5 | interface View
6 | interface Presenter{
7 | fun onCreate()
8 | fun onGetBatteryLevel()
9 | }
10 |
11 | }
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Feb 17 01:30:24 CET 2019
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-3.4.1-bin.zip
7 |
--------------------------------------------------------------------------------
/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-4.10.2-all.zip
7 |
--------------------------------------------------------------------------------
/shared/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Feb 17 01:28:23 CET 2019
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-4.10.1-all.zip
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.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: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/shared/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | resolutionStrategy {
3 | eachPlugin {
4 | if (requested.id.id == "kotlin-multiplatform") {
5 | useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
6 | }
7 | }
8 | }
9 | }
10 | rootProject.name = 'shared'
11 |
12 |
13 | enableFeaturePreview('GRADLE_METADATA')
14 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file must *NOT* be checked into Version Control Systems,
2 | # as it contains information specific to your local configuration.
3 | #
4 | # Location of the SDK. This is only used by Gradle.
5 | # For customization when using a Version Control System, please read the
6 | # header note.
7 | #Sun Feb 17 08:06:21 CET 2019
8 | ndk.dir=/home/jens/Android/Sdk/ndk-bundle
9 | sdk.dir=/home/jens/Android/Sdk
10 |
--------------------------------------------------------------------------------
/shared/src/flutterMain/model/post.dart:
--------------------------------------------------------------------------------
1 |
2 | class Post {
3 | final int userId;
4 | final int id;
5 | final String title;
6 | final String body;
7 |
8 | Post({this.userId, this.id, this.title, this.body});
9 |
10 | factory Post.fromJson(Map json) {
11 | return Post(
12 | userId: json['userId'],
13 | id: json['id'],
14 | title: json['title'],
15 | body: json['body'],
16 | );
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/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: [UIApplicationLaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/de/jensklingenberg/jkflutter/channel/BatteryChannel.kt:
--------------------------------------------------------------------------------
1 | package de.jensklingenberg.jkflutter.channel
2 |
3 |
4 |
5 | class BatteryChannel{
6 | companion object {
7 | val CHANNEL = "samples.flutter.io/battery1"
8 | val METHOD_BATTERIE= "getBatteryLevel"
9 | }
10 |
11 | }
12 |
13 | class TimerEventChannel{
14 | companion object {
15 | val CHANNEL = "com.yourcompany.eventchannelsample/stream"
16 | }
17 |
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/shared/src/flutterMain/ui/main/MainApp.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | import 'MainPage.dart';
5 |
6 | class MainApp extends StatelessWidget {
7 | // This widget is the root of your application.
8 | @override
9 | Widget build(BuildContext context) {
10 | return MaterialApp(
11 | title: 'Flutter Demo',
12 | theme:
13 | ThemeData(primarySwatch: Colors.blue, platform: TargetPlatform.iOS),
14 | home: MainPage(),
15 | );
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/shared/src/flutterMain/ui/navigation/SecondRoute.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class SecondRoute extends StatelessWidget {
5 | @override
6 | Widget build(BuildContext context) {
7 | return Scaffold(
8 | appBar: AppBar(
9 | title: Text("Second Route"),
10 | ),
11 | body: Center(
12 | child: RaisedButton(
13 | onPressed: () {
14 | Navigator.pop(context);
15 | },
16 | child: Text('Go back!'),
17 | ),
18 | ),
19 | );
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # jk_flutter
2 |
3 | My Flutter Playground
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.io/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.io/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/shared/src/flutterMain/utils/MethodChannelHelper.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 |
3 | class MethodChannelHelper {
4 | static const platform = const MethodChannel('samples.flutter.io/battery1');
5 |
6 | static Future getBatteryLevel() async {
7 | String batteryLevel;
8 | try {
9 | final int result = await platform.invokeMethod('getBatteryLevel');
10 | batteryLevel = 'Battery le hvel at $result % .';
11 | } on PlatformException catch (e) {
12 | batteryLevel = "Failed to get battery level: '${e.message}'.";
13 | }
14 |
15 | return batteryLevel;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | include ':shared'
3 |
4 |
5 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
6 |
7 | project(':shared').projectDir = new File(flutterProjectRoot.toFile(), '/shared')
8 |
9 |
10 |
11 | def plugins = new Properties()
12 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
13 | if (pluginsFile.exists()) {
14 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
15 | }
16 |
17 | plugins.each { name, path ->
18 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
19 | include ":$name"
20 | project(":$name").projectDir = pluginDirectory
21 | }
22 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.21'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.3.1'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"
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 |
--------------------------------------------------------------------------------
/shared/src/main/kotlin/Team.sq:
--------------------------------------------------------------------------------
1 |
2 | CREATE TABLE team (
3 | id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
4 | name TEXT NOT NULL UNIQUE,
5 | founded INTEGER AS Date NOT NULL,
6 | coach TEXT NOT NULL,
7 | captain INTEGER,
8 | won_cup INTEGER AS Boolean NOT NULL DEFAULT 0,
9 | FOREIGN KEY(captain) REFERENCES player(id)
10 | );
11 |
12 | insertTeam:
13 | INSERT INTO team(name, founded, coach, won_cup)
14 | VALUES (?, ?, ?, ?);
15 |
16 | setCaptain:
17 | UPDATE team
18 | SET captain = (SELECT id FROM player WHERE number = :player_number AND team = team.id)
19 | WHERE name = :team_name;
20 |
21 | selectAll:
22 | SELECT *
23 | FROM team;
24 |
25 | updateCoachForTeam:
26 | UPDATE team
27 | SET coach = ?
28 | WHERE name = ?;
--------------------------------------------------------------------------------
/shared/src/main/sqldelight/de/jensklingenberg/jkflutter/db/Team.sq:
--------------------------------------------------------------------------------
1 |
2 | CREATE TABLE team (
3 | id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
4 | name TEXT NOT NULL UNIQUE,
5 | founded INTEGER AS Date NOT NULL,
6 | coach TEXT NOT NULL,
7 | captain INTEGER,
8 | won_cup INTEGER AS Boolean NOT NULL DEFAULT 0,
9 | FOREIGN KEY(captain) REFERENCES player(id)
10 | );
11 |
12 | insertTeam:
13 | INSERT INTO team(name, founded, coach, won_cup)
14 | VALUES (?, ?, ?, ?);
15 |
16 | setCaptain:
17 | UPDATE team
18 | SET captain = (SELECT id FROM player WHERE number = :player_number AND team = team.id)
19 | WHERE name = :team_name;
20 |
21 | selectAll:
22 | SELECT *
23 | FROM team;
24 |
25 | updateCoachForTeam:
26 | UPDATE team
27 | SET coach = ?
28 | WHERE name = ?;
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 |
--------------------------------------------------------------------------------
/shared/src/main/kotlin/Player.sq:
--------------------------------------------------------------------------------
1 |
2 |
3 | CREATE TABLE player (
4 | id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
5 | first_name TEXT NOT NULL,
6 | last_name TEXT NOT NULL,
7 | number INTEGER AS Integer NOT NULL,
8 | team INTEGER,
9 | age INTEGER AS Integer NOT NULL,
10 | birth_date INTEGER AS Date NOT NULL,
11 | weight REAL AS Float NOT NULL,
12 | shoots TEXT AS PlayerVals.Shoots NOT NULL,
13 | position TEXT AS PlayerVals.Position NOT NULL,
14 | FOREIGN KEY (team) REFERENCES team(id)
15 | );
16 |
17 | insertPlayer:
18 | INSERT INTO player (first_name, last_name, number, team, age, weight, birth_date, shoots, position)
19 | VALUES (?, ?, ?, (SELECT id FROM team WHERE name = ?), ?, ?, ?, ?, ?);
20 |
21 | selectAll:
22 | SELECT *
23 | FROM player
24 | JOIN team ON player.team = team.id;
25 |
26 | forTeam:
27 | SELECT first_name, last_name, CAST (number AS TEXT), team.name AS teamName
28 | FROM player
29 | JOIN team ON player.team = team.id
30 | WHERE team.id = :team_id OR :team_id = -1;
31 |
--------------------------------------------------------------------------------
/shared/src/main/sqldelight/de/jensklingenberg/jkflutter/db/Player.sq:
--------------------------------------------------------------------------------
1 |
2 |
3 | CREATE TABLE player (
4 | id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
5 | first_name TEXT NOT NULL,
6 | last_name TEXT NOT NULL,
7 | number INTEGER AS Integer NOT NULL,
8 | team INTEGER,
9 | age INTEGER AS Integer NOT NULL,
10 | birth_date INTEGER AS Date NOT NULL,
11 | weight REAL AS Float NOT NULL,
12 | shoots TEXT AS PlayerVals.Shoots NOT NULL,
13 | position TEXT AS PlayerVals.Position NOT NULL,
14 | FOREIGN KEY (team) REFERENCES team(id)
15 | );
16 |
17 | insertPlayer:
18 | INSERT INTO player (first_name, last_name, number, team, age, weight, birth_date, shoots, position)
19 | VALUES (?, ?, ?, (SELECT id FROM team WHERE name = ?), ?, ?, ?, ?, ?);
20 |
21 | selectAll:
22 | SELECT *
23 | FROM player
24 | JOIN team ON player.team = team.id;
25 |
26 | forTeam:
27 | SELECT first_name, last_name, CAST (number AS TEXT), team.name AS teamName
28 | FROM player
29 | JOIN team ON player.team = team.id
30 | WHERE team.id = :team_id OR :team_id = -1;
31 |
--------------------------------------------------------------------------------
/shared/src/commonMain/kotlin/sample/flutter.kt:
--------------------------------------------------------------------------------
1 | package sample
2 |
3 |
4 | class BuildContext
5 | data class Post(val name: String)
6 |
7 | open class Widget {
8 |
9 | }
10 |
11 | class AppBar(title: Text)
12 |
13 | class Scaffold(appBar: AppBar? = null, body: Widget = Widget()) : StatefulWidget() {
14 |
15 | }
16 |
17 | class Future
18 |
19 | class Text(var data: String) : Widget()
20 |
21 | class Center(child: Widget = Widget()) : Widget()
22 |
23 |
24 | class AsyncSnapshot {
25 | val data: T? = null
26 |
27 | }
28 |
29 | class FutureBuilder(future: Future, builder: (context: BuildContext, snapshot: AsyncSnapshot) -> Widget) : StatefulWidget()
30 |
31 | abstract class StatelessWidget : Widget() {
32 | abstract fun build(context: BuildContext): Widget
33 | }
34 |
35 |
36 | abstract class StatefulWidget : Widget() {
37 |
38 |
39 | }
40 |
41 |
42 | abstract class ProgressIndicator : StatefulWidget()
43 | class CircularProgressIndicator : ProgressIndicator()
44 |
45 |
46 | fun fetchPost(): Future {
47 | throw Exception("")
48 | }
49 |
--------------------------------------------------------------------------------
/shared/src/flutterMain/ui/list_view_example.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../utils/MethodChannelHelper.dart';
3 |
4 | class ListViewExample extends StatefulWidget {
5 | ListViewExample({Key key, this.title}) : super(key: key);
6 |
7 | final String title;
8 |
9 | @override
10 | _ListViewExampleState createState() => _ListViewExampleState();
11 | }
12 |
13 | class _ListViewExampleState extends State {
14 | @override
15 | Widget build(BuildContext context) {
16 | return Scaffold(
17 | appBar: AppBar(
18 | title: Text("ddd"),
19 | ),
20 | body: ListView(
21 | children: [
22 | ListTile(
23 | leading: Icon(Icons.map),
24 | title: Text('Map'),
25 | ),
26 | ListTile(
27 | leading: Icon(Icons.photo_album),
28 | title: Text('Album'),
29 | ),
30 | ListTile(
31 | leading: Icon(Icons.phone),
32 | title: Text('Phone'),
33 | ),
34 | ],
35 | ),
36 | );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/shared/src/flutterMain/ui/toast/Home.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class Home extends StatelessWidget {
4 | const Home({
5 | Key key,
6 | }) : super(key: key);
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return Scaffold(
11 | appBar: AppBar(
12 | title: const Text('Snack bar'),
13 | ),
14 |
15 | /// We use [Builder] here to use a [context] that is a descendant of [Scaffold]
16 | /// or else [Scaffold.of] will return null
17 | body: Builder(
18 | builder: (context) => Center(
19 | child: RaisedButton(
20 | child: const Text('Show toast'),
21 | onPressed: () => _showToast(context),
22 | ),
23 | ),
24 | ),
25 | );
26 | }
27 |
28 | void _showToast(BuildContext context) {
29 | final scaffold = Scaffold.of(context);
30 | scaffold.showSnackBar(
31 | SnackBar(
32 | content: const Text('Added to favorite'),
33 | action: SnackBarAction(
34 | label: 'UNDO', onPressed: scaffold.hideCurrentSnackBar),
35 | ),
36 | );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/shared/src/flutterTest/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 '../flutterMain/ui/main/MainApp.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(MainApp());
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 |
--------------------------------------------------------------------------------
/shared/src/flutterMain/ui/platform_specific/BatterieLevel.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 |
4 | import '../../utils/MethodChannelHelper.dart';
5 |
6 | class BatterieLevel extends StatefulWidget {
7 | BatterieLevel({Key key, this.title}) : super(key: key);
8 |
9 | final String title;
10 |
11 | @override
12 | _MyHomePageState createState() => _MyHomePageState();
13 | }
14 |
15 | class _MyHomePageState extends State {
16 | // Get battery level.
17 | String _batteryLevel = 'Unknown battery level.';
18 |
19 | Future _getBatteryLevel() async {
20 | String batteryLevel;
21 | batteryLevel = await MethodChannelHelper.getBatteryLevel();
22 |
23 | setState(() {
24 | _batteryLevel = batteryLevel;
25 | });
26 | }
27 |
28 | @override
29 | Widget build(BuildContext context) {
30 | return Material(
31 | child: Center(
32 | child: Column(
33 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
34 | children: [
35 | RaisedButton(
36 | child: Text('Get Battery Level'),
37 | onPressed: _getBatteryLevel,
38 | ),
39 | Text(_batteryLevel),
40 | ],
41 | ),
42 | ),
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/de/jensklingenberg/jkflutter/MainPresenter.kt:
--------------------------------------------------------------------------------
1 | package de.jensklingenberg.jkflutter
2 |
3 | import android.content.Context
4 | import android.content.ContextWrapper
5 | import android.content.Intent
6 | import android.content.IntentFilter
7 | import android.os.BatteryManager
8 | import android.os.Build
9 | import sample.Scaffold
10 |
11 | class MainPresenter(val view: MainContract.View) : MainContract.Presenter {
12 | override fun onGetBatteryLevel() {
13 |
14 |
15 | }
16 |
17 |
18 | override fun onCreate() {
19 |
20 |
21 | }
22 |
23 |
24 | fun getBatteryLevel(context: Context): Int {
25 | val batteryLevel: Int
26 | Scaffold()
27 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
28 | val batteryManager = context.getSystemService(Context.BATTERY_SERVICE) as BatteryManager
29 | batteryLevel = batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY)
30 | } else {
31 | val intent = ContextWrapper(context.applicationContext).registerReceiver(null, IntentFilter(Intent.ACTION_BATTERY_CHANGED))
32 | batteryLevel = intent!!.getIntExtra(BatteryManager.EXTRA_LEVEL, -1) * 100 / intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1)
33 | }
34 |
35 | return batteryLevel
36 | }
37 |
38 | }
--------------------------------------------------------------------------------
/shared/src/flutterMain/ui/login/LoginWidget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class LoginWidget extends StatelessWidget {
4 | Widget build(BuildContext context) {
5 | return Scaffold(
6 | appBar: AppBar(
7 | backgroundColor: Colors.white,
8 | automaticallyImplyLeading: false,
9 | title: Text(
10 | "Login",
11 | style: TextStyle(color: Colors.black),
12 | textAlign: TextAlign.left,
13 | ),
14 | ),
15 | body: Container(
16 | alignment: Alignment.centerLeft,
17 | child: Column(
18 | crossAxisAlignment: CrossAxisAlignment.stretch,
19 | children: [
20 | TextField(
21 | decoration: InputDecoration(
22 | labelText: 'Name',
23 | suffixIcon: Icon(Icons.account_box),
24 | ),
25 | ),
26 | TextField(
27 | decoration: InputDecoration(
28 | labelText: 'Password',
29 | suffixIcon: Icon(Icons.account_box),
30 | ),
31 | ),
32 | RaisedButton(
33 | color: Theme.of(context).accentColor,
34 | child: Text(
35 | 'Login',
36 | style: TextStyle(color: Colors.white),
37 | ),
38 | onPressed: () {},
39 | )
40 | ],
41 | ),
42 | ),
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/shared/src/flutterMain/ui/networkview.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:convert';
3 |
4 | import 'package:flutter/material.dart';
5 | import 'package:http/http.dart' as http;
6 |
7 | import '../model/post.dart';
8 |
9 | Future fetchPost() async {
10 | final response =
11 | await http.get('https://jsonplaceholder.typicode.com/posts/1');
12 |
13 | if (response.statusCode == 200) {
14 | // If the call to the server was successful, parse the JSON
15 | return Post.fromJson(json.decode(response.body));
16 | } else {
17 | // If that call was not successful, throw an error.
18 | throw Exception('Failed to load post');
19 | }
20 | }
21 |
22 | class NetworkView extends StatelessWidget {
23 | final Future post;
24 |
25 | NetworkView({Key key, this.post}) : super(key: key);
26 |
27 | @override
28 | Widget build(BuildContext context) {
29 | return Scaffold(
30 | appBar: AppBar(
31 | title: Text('Fetch Data Example'),
32 | ),
33 | body: Center(
34 | child: FutureBuilder(
35 | future: fetchPost(),
36 | builder: (context, snapshot) {
37 | if (snapshot.hasData) {
38 | return Text(snapshot.data.title);
39 | } else if (snapshot.hasError) {
40 | return Text("${snapshot.error}");
41 | }
42 |
43 | // By default, show a loading spinner
44 | return CircularProgressIndicator();
45 | },
46 | ),
47 | ),
48 | );
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.lock
4 | *.log
5 | *.pyc
6 | *.swp
7 | .DS_Store
8 | .atom/
9 | .buildlog/
10 | .history
11 | .svn/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # Visual Studio Code related
20 | .vscode/
21 |
22 | # Flutter/Dart/Pub related
23 | **/doc/api/
24 | .dart_tool/
25 | .flutter-plugins
26 | .packages
27 | .pub-cache/
28 | .pub/
29 | build/
30 |
31 | # Android related
32 | **/android/**/gradle-wrapper.jar
33 | **/android/.gradle
34 | **/android/captures/
35 | **/android/gradlew
36 | **/android/gradlew.bat
37 | **/android/local.properties
38 | **/android/**/GeneratedPluginRegistrant.java
39 |
40 | # iOS/XCode related
41 | **/ios/**/*.mode1v3
42 | **/ios/**/*.mode2v3
43 | **/ios/**/*.moved-aside
44 | **/ios/**/*.pbxuser
45 | **/ios/**/*.perspectivev3
46 | **/ios/**/*sync/
47 | **/ios/**/.sconsign.dblite
48 | **/ios/**/.tags*
49 | **/ios/**/.vagrant/
50 | **/ios/**/DerivedData/
51 | **/ios/**/Icon?
52 | **/ios/**/Pods/
53 | **/ios/**/.symlinks/
54 | **/ios/**/profile
55 | **/ios/**/xcuserdata
56 | **/ios/.generated/
57 | **/ios/Flutter/App.framework
58 | **/ios/Flutter/Flutter.framework
59 | **/ios/Flutter/Generated.xcconfig
60 | **/ios/Flutter/app.flx
61 | **/ios/Flutter/app.zip
62 | **/ios/Flutter/flutter_assets/
63 | **/ios/ServiceDefinitions.json
64 | **/ios/Runner/GeneratedPluginRegistrant.*
65 |
66 | # Exceptions to above rules.
67 | !**/ios/**/default.mode1v3
68 | !**/ios/**/default.mode2v3
69 | !**/ios/**/default.pbxuser
70 | !**/ios/**/default.perspectivev3
71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
72 |
--------------------------------------------------------------------------------
/shared/src/flutterMain/ui/main/MainDrawer.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../search/SearchExample.dart';
4 |
5 | class MainDrawer extends Drawer {
6 | BuildContext outContext;
7 |
8 | MainDrawer(BuildContext context) {
9 | outContext = context;
10 | }
11 |
12 | @override
13 | // TODO: implement child
14 | Widget get child => ListView(
15 | // Important: Remove any padding from the ListView.
16 | padding: EdgeInsets.zero,
17 | children: [
18 | DrawerHeader(
19 | child: Text('Drawer Header'),
20 | decoration: BoxDecoration(
21 | color: Colors.blue,
22 | ),
23 | ),
24 | ListTile(
25 | leading: Icon(Icons.home),
26 | title: Text('Search'),
27 | onTap: () {
28 | // Update the state of the app
29 | // ...
30 | // Then close the drawer
31 | Navigator.push(
32 | outContext,
33 | MaterialPageRoute(builder: (context) => SearchExample()),
34 | );
35 | },
36 | ),
37 | ListTile(
38 | leading: Icon(Icons.account_box),
39 | title: Text('Profile'),
40 | onTap: () {
41 | // Update the state of the app
42 | // ...
43 | // Then close the drawer
44 | Navigator.push(
45 | outContext,
46 | MaterialPageRoute(builder: (context) => SearchExample()),
47 | );
48 | },
49 | ),
50 | ],
51 | );
52 | }
53 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | jk_flutter
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/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 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
15 |
19 |
26 |
30 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/shared/src/flutterMain/ui/eventChannelSample/EventChannelSample.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter/services.dart';
5 |
6 | class EventChannelSamplePage extends StatefulWidget {
7 | EventChannelSamplePage({Key key, this.title}) : super(key: key);
8 |
9 | final String title;
10 |
11 | @override
12 | _EventChannelSamplePageState createState() =>
13 | new _EventChannelSamplePageState();
14 | }
15 |
16 | class _EventChannelSamplePageState extends State {
17 | static const stream =
18 | const EventChannel('com.yourcompany.eventchannelsample/stream');
19 |
20 | int _timer = 0;
21 | StreamSubscription _timerSubscription = null;
22 |
23 | void _enableTimer() {
24 | if (_timerSubscription == null) {
25 | _timerSubscription = stream.receiveBroadcastStream().listen(_updateTimer);
26 | }
27 | }
28 |
29 | void _disableTimer() {
30 | if (_timerSubscription != null) {
31 | _timerSubscription.cancel();
32 | _timerSubscription = null;
33 | }
34 | }
35 |
36 | void _updateTimer(timer) {
37 | debugPrint("Timer $timer");
38 | setState(() => _timer = timer);
39 | }
40 |
41 | @override
42 | Widget build(BuildContext context) {
43 | var timerCard = new Card(
44 | child: new Column(mainAxisSize: MainAxisSize.min, children: [
45 | const ListTile(
46 | leading: const Icon(Icons.timer),
47 | title: const Text('Event and Method Channel Sample'),
48 | subtitle: const Text(
49 | 'An example application showing off the communications between Flutter and native Android.'),
50 | ),
51 | new Center(
52 | child: new Text(
53 | '$_timer',
54 | style: Theme.of(context).textTheme.display1,
55 | ),
56 | ),
57 | new ButtonTheme.bar(
58 | child: new ButtonBar(children: [
59 | new FlatButton(
60 | child: const Text('Enable'),
61 | onPressed: _enableTimer,
62 | ),
63 | new FlatButton(
64 | child: const Text('Disable'),
65 | onPressed: _disableTimer,
66 | ),
67 | ]))
68 | ]));
69 |
70 | return new Scaffold(
71 | appBar: new AppBar(
72 | title: new Text(widget.title),
73 | ),
74 | body: new Container(
75 | padding: new EdgeInsets.all(8.0),
76 | child: timerCard,
77 | ));
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 27
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 "jensklingenberg.de.jkflutter"
42 | minSdkVersion 16
43 | targetSdkVersion 27
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "android.support.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 project(':shared')
64 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
65 | testImplementation 'junit:junit:4.12'
66 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
67 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
68 | implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
69 | implementation 'io.reactivex.rxjava2:rxjava:2.1.7'
70 | }
71 |
72 |
73 | // workaround for https://youtrack.jetbrains.com/issue/KT-27170
74 | configurations {
75 | compileClasspath
76 | }
77 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: jk_flutter
2 | description: My Flutter Playground
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # Read more about versioning at semver.org.
10 | version: 1.0.0+1
11 |
12 | environment:
13 | sdk: ">=2.0.0-dev.68.0 <3.0.0"
14 |
15 | dependencies:
16 | flutter:
17 | sdk: flutter
18 | flutter_localizations:
19 | sdk: flutter
20 | dio: 1.0.0
21 | kt_dart: ^0.5.0
22 | rxdart: ^0.20.0
23 |
24 |
25 | # The following adds the Cupertino Icons font to your application.
26 | # Use with the CupertinoIcons class for iOS style icons.
27 | cupertino_icons: ^0.1.2
28 |
29 | dev_dependencies:
30 | flutter_test:
31 | sdk: flutter
32 | http: ^0.12.0+1
33 |
34 | # For information on the generic Dart part of this file, see the
35 | # following page: https://www.dartlang.org/tools/pub/pubspec
36 |
37 | # The following section is specific to Flutter.
38 | flutter:
39 |
40 | # The following line ensures that the Material Icons font is
41 | # included with your application, so that you can use the icons in
42 | # the material Icons class.
43 | uses-material-design: true
44 |
45 | # To add assets to your application, add an assets section, like this:
46 | # assets:
47 | # - images/a_dot_burr.jpeg
48 | # - images/a_dot_ham.jpeg
49 |
50 | # An image asset can refer to one or more resolution-specific "variants", see
51 | # https://flutter.io/assets-and-images/#resolution-aware.
52 |
53 | # For details regarding adding assets from package dependencies, see
54 | # https://flutter.io/assets-and-images/#from-packages
55 |
56 | # To add custom fonts to your application, add a fonts section here,
57 | # in this "flutter" section. Each entry in this list should have a
58 | # "family" key with the font family name, and a "fonts" key with a
59 | # list giving the asset and other descriptors for the font. For
60 | # example:
61 | # fonts:
62 | # - family: Schyler
63 | # fonts:
64 | # - asset: fonts/Schyler-Regular.ttf
65 | # - asset: fonts/Schyler-Italic.ttf
66 | # style: italic
67 | # - family: Trajan Pro
68 | # fonts:
69 | # - asset: fonts/TrajanPro.ttf
70 | # - asset: fonts/TrajanPro_Bold.ttf
71 | # weight: 700
72 | #
73 | # For details regarding fonts from package dependencies,
74 | # see https://flutter.io/custom-fonts/#from-packages
75 |
--------------------------------------------------------------------------------
/shared/src/flutterMain/ui/main/MainPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | import '../eventChannelSample/EventChannelSample.dart';
5 | import '../login/LoginWidget.dart';
6 | import '../networkview.dart';
7 | import '../platform_specific/BatterieLevel.dart';
8 | import '../search/SearchExample.dart';
9 | import '../toast/Home.dart';
10 | import 'MainDrawer.dart';
11 |
12 | class MainPage extends StatelessWidget {
13 | @override
14 | Widget build(BuildContext context) {
15 | return Scaffold(
16 | appBar: AppBar(title: Text("Example App")),
17 | body: ListView(
18 | children: [
19 | RaisedButton(
20 | child: Text('Open fetch network data example'),
21 | onPressed: () {
22 | Navigator.push(
23 | context,
24 | MaterialPageRoute(builder: (context) => NetworkView()),
25 | );
26 | },
27 | ),
28 | RaisedButton(
29 | child: Text('Open route2'),
30 | onPressed: () {
31 | Navigator.push(
32 | context,
33 | MaterialPageRoute(builder: (context) => SearchExample()),
34 | );
35 | },
36 | ),
37 | RaisedButton(
38 | child: Text('Login'),
39 | onPressed: () {
40 | Navigator.push(
41 | context,
42 | MaterialPageRoute(builder: (context) => LoginWidget()),
43 | );
44 | },
45 | ),
46 | RaisedButton(
47 | child: Text('BatterieLevel'),
48 | onPressed: () {
49 | Navigator.push(
50 | context,
51 | MaterialPageRoute(builder: (context) => BatterieLevel()),
52 | );
53 | },
54 | ),
55 | RaisedButton(
56 | child: Text('Eventchannel'),
57 | onPressed: () {
58 | Navigator.push(
59 | context,
60 | MaterialPageRoute(
61 | builder: (context) => EventChannelSamplePage(
62 | title: "Hall",
63 | )),
64 | );
65 | },
66 | ),
67 | RaisedButton(
68 | child: Text('Toast'),
69 | onPressed: () {
70 | Navigator.push(
71 | context,
72 | MaterialPageRoute(builder: (context) => Home()),
73 | );
74 | },
75 | ),
76 | ],
77 | ),
78 | drawer: MainDrawer(context),
79 | bottomNavigationBar: BottomNavigationBar(
80 | items: [
81 | BottomNavigationBarItem(icon: Icon(Icons.home), title: Text('Home')),
82 | BottomNavigationBarItem(
83 | icon: Icon(Icons.business), title: Text('Business')),
84 | BottomNavigationBarItem(
85 | icon: Icon(Icons.school), title: Text('School')),
86 | ],
87 | ),
88 | );
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/de/jensklingenberg/jkflutter/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package de.jensklingenberg.jkflutter
2 |
3 | import android.content.ContentValues.TAG
4 | import android.os.Bundle
5 | import android.util.Log
6 | import de.jensklingenberg.jkflutter.channel.BatteryChannel
7 | import de.jensklingenberg.jkflutter.channel.TimerEventChannel
8 |
9 | import io.flutter.app.FlutterActivity
10 | import io.flutter.plugin.common.EventChannel
11 | import io.flutter.plugin.common.MethodChannel
12 | import io.flutter.plugins.GeneratedPluginRegistrant
13 | import io.reactivex.Observable
14 | import io.reactivex.disposables.Disposable
15 | import java.util.concurrent.TimeUnit
16 |
17 |
18 | class MainActivity : FlutterActivity(), MainContract.View {
19 |
20 | lateinit var presenter: MainPresenter
21 |
22 | var timerSubscription: Disposable?=null
23 |
24 |
25 | override fun onCreate(savedInstanceState: Bundle?) {
26 | super.onCreate(savedInstanceState)
27 | GeneratedPluginRegistrant.registerWith(this)
28 | presenter = MainPresenter(this)
29 |
30 | MethodChannel(flutterView, BatteryChannel.CHANNEL).setMethodCallHandler { call, result ->
31 | when (call.method) {
32 | BatteryChannel.METHOD_BATTERIE -> {
33 | val batteryLevel = presenter.getBatteryLevel(this)
34 | if (batteryLevel != -1) {
35 | result.success(batteryLevel)
36 | } else {
37 | result.error("UNAVAILABLE", "Battery level not available.", null)
38 | }
39 | }
40 | else -> result.notImplemented()
41 | }
42 | }
43 |
44 |
45 |
46 | EventChannel(flutterView, TimerEventChannel.CHANNEL).setStreamHandler(
47 | object: EventChannel.StreamHandler{
48 | override fun onListen(arguments: Any?, events: EventChannel.EventSink?) {
49 | timerSubscription = Observable
50 | .interval(0, 1, TimeUnit.SECONDS)
51 | .subscribe(
52 | { timer: Long ->
53 | Log.w(TAG, "emitting timer event $timer")
54 | events?.success(timer)
55 | },
56 | { error: Throwable ->
57 | Log.e(TAG, "error in emitting timer", error)
58 | events?.error("STREAM", "Error in processing observable", error.message)
59 | },
60 | { Log.w(TAG, "closing the timer observable") }
61 | )
62 |
63 | }
64 |
65 | override fun onCancel(arguments: Any?) {
66 | timerSubscription?.dispose()
67 | timerSubscription=null
68 | }
69 |
70 | }
71 | )
72 |
73 | }
74 |
75 |
76 | }
77 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/shared/build.gradle:
--------------------------------------------------------------------------------
1 |
2 | buildscript {
3 | repositories {
4 | google()
5 | mavenCentral()
6 | jcenter()
7 | maven {
8 | url "https://plugins.gradle.org/m2/"
9 | }
10 |
11 |
12 | }
13 | dependencies {
14 | classpath 'com.squareup.sqldelight:gradle-plugin:1.0.3'
15 | classpath 'com.android.tools.build:gradle:3.3.1'
16 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"
17 |
18 | }
19 | }
20 |
21 |
22 |
23 | plugins {
24 | id "org.jetbrains.kotlin.multiplatform"
25 | }
26 | repositories {
27 | google()
28 | jcenter()
29 | mavenCentral()
30 | }
31 |
32 |
33 |
34 | //apply plugin: 'com.android.application'
35 |
36 | /*
37 | * android {
38 | sourceSets {
39 | main{
40 | java.srcDirs += 'src/androidMain/kotlin'
41 | manifest.srcFile 'src/androidMain/AndroidManifest.xml'
42 | res.srcDirs = ['src/androidMain/res']
43 | resources.srcDirs = ['src/androidMain']
44 | }
45 |
46 | }
47 |
48 | compileSdkVersion 28
49 | defaultConfig {
50 | applicationId 'de.jensklingenberg.jkflutter'
51 | minSdkVersion 15
52 | targetSdkVersion 28
53 | versionCode 1
54 | versionName '1.0'
55 | testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
56 | }
57 | buildTypes {
58 | release {
59 | minifyEnabled false
60 | }
61 | }
62 | }
63 | *
64 | * */
65 |
66 |
67 | group 'de.jensklingenberg'
68 | version '0.0.1'
69 |
70 |
71 | kotlin {
72 | jvm()
73 | // android("android")
74 | // This is for iPhone emulator
75 | // Switch here to iosArm64 (or iosArm32) to build library for iPhone device
76 |
77 | // For ARM, should be changed to iosArm32 or iosArm64
78 | // For Linux, should be changed to e.g. linuxX64
79 | // For MacOS, should be changed to e.g. macosX64
80 | // For Windows, should be changed to e.g. mingwX64
81 | sourceSets {
82 | commonMain {
83 | dependencies {
84 | implementation kotlin('stdlib-common')
85 | }
86 | }
87 | commonTest {
88 | dependencies {
89 | implementation kotlin('test-common')
90 | implementation kotlin('test-annotations-common')
91 | }
92 | }
93 | jvmMain {
94 | dependencies {
95 | implementation kotlin('stdlib-jdk8')
96 | implementation "com.squareup.sqldelight:sqlite-driver:1.0.3"
97 | }
98 | }
99 | jvmTest {
100 | dependencies {
101 | implementation kotlin('test')
102 | implementation kotlin('test-junit')
103 | }
104 | }
105 | /* androidMain {
106 | dependencies {
107 | implementation kotlin('stdlib')
108 | implementation fileTree(dir: 'libs', include: ['*.jar'])
109 | implementation 'com.android.support:appcompat-v7:28.0.0'
110 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
111 | implementation 'com.android.support.test:runner:1.0.2'
112 | }
113 | }
114 | androidTest {
115 | dependencies {
116 | implementation kotlin('test')
117 | implementation kotlin('test-junit')
118 | }
119 | }
120 |
121 | */
122 |
123 |
124 | }
125 | }
126 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/shared/src/flutterMain/ui/search/SearchExample.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:dio/dio.dart';
3 |
4 | class SearchExample extends StatefulWidget {
5 | // ExamplePage({ Key key }) : super(key: key);
6 | @override
7 | _SearchExampleState createState() => new _SearchExampleState();
8 | }
9 |
10 | class _SearchExampleState extends State {
11 | // final formKey = new GlobalKey();
12 | // final key = new GlobalKey();
13 | final TextEditingController _filter = new TextEditingController();
14 | final dio = new Dio();
15 | String _searchText = "";
16 | List names = new List();
17 | List filteredNames = new List();
18 | Icon _searchIcon = new Icon(Icons.search);
19 | Widget _appBarTitle = new Text('Search Example');
20 |
21 | _SearchExampleState() {
22 | _filter.addListener(() {
23 | if (_filter.text.isEmpty) {
24 | setState(() {
25 | _searchText = "";
26 | filteredNames = names;
27 | });
28 | } else {
29 | setState(() {
30 | _searchText = _filter.text;
31 | });
32 | }
33 | });
34 | }
35 |
36 | @override
37 | void initState() {
38 | this._getNames();
39 | super.initState();
40 | }
41 |
42 | Widget build(BuildContext context) {
43 | return Scaffold(
44 | appBar: _buildBar(context),
45 | body: Container(
46 | child: _buildList(),
47 | ),
48 | resizeToAvoidBottomPadding: false,
49 | );
50 | }
51 |
52 | Widget _buildBar(BuildContext context) {
53 | return new AppBar(
54 | centerTitle: true,
55 | title: _appBarTitle,
56 | leading: new IconButton(
57 | icon: _searchIcon,
58 | onPressed: _searchPressed,
59 | ),
60 | );
61 | }
62 |
63 | Widget _buildList() {
64 | if (!(_searchText.isEmpty)) {
65 | List tempList = new List();
66 | for (int i = 0; i < filteredNames.length; i++) {
67 | if (filteredNames[i]['name']
68 | .toLowerCase()
69 | .contains(_searchText.toLowerCase())) {
70 | tempList.add(filteredNames[i]);
71 | }
72 | }
73 | filteredNames = tempList;
74 | }
75 | return ListView.builder(
76 | itemCount: names == null ? 0 : filteredNames.length,
77 | itemBuilder: (BuildContext context, int index) {
78 | return new ListTile(
79 | title: Text(filteredNames[index]['name']),
80 | onTap: () => print(filteredNames[index]['name']),
81 | );
82 | },
83 | );
84 | }
85 |
86 | void _searchPressed() {
87 | setState(() {
88 | if (this._searchIcon.icon == Icons.search) {
89 | this._searchIcon = new Icon(Icons.close);
90 | this._appBarTitle = new TextField(
91 | controller: _filter,
92 | decoration: new InputDecoration(
93 | prefixIcon: new Icon(Icons.search), hintText: 'Search...'),
94 | );
95 | } else {
96 | this._searchIcon = new Icon(Icons.search);
97 | this._appBarTitle = new Text('Search Example');
98 | filteredNames = names;
99 | _filter.clear();
100 | }
101 | });
102 | }
103 |
104 | void _getNames() async {
105 | final response = await dio.get('https://swapi.co/api/people');
106 | List tempList = new List();
107 | for (int i = 0; i < response.data['results'].length; i++) {
108 | tempList.add(response.data['results'][i]);
109 | }
110 | setState(() {
111 | names = tempList;
112 | names.shuffle();
113 | filteredNames = names;
114 | });
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn ( ) {
37 | echo "$*"
38 | }
39 |
40 | die ( ) {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save ( ) {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/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 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
15 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
22 | /* End PBXBuildFile section */
23 |
24 | /* Begin PBXCopyFilesBuildPhase section */
25 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
26 | isa = PBXCopyFilesBuildPhase;
27 | buildActionMask = 2147483647;
28 | dstPath = "";
29 | dstSubfolderSpec = 10;
30 | files = (
31 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
32 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
33 | );
34 | name = "Embed Frameworks";
35 | runOnlyForDeploymentPostprocessing = 0;
36 | };
37 | /* End PBXCopyFilesBuildPhase section */
38 |
39 | /* Begin PBXFileReference section */
40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
42 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
43 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
44 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
45 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
46 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
48 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
49 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
50 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
51 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
52 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
53 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
54 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
55 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
56 | /* End PBXFileReference section */
57 |
58 | /* Begin PBXFrameworksBuildPhase section */
59 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
60 | isa = PBXFrameworksBuildPhase;
61 | buildActionMask = 2147483647;
62 | files = (
63 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
64 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | /* End PBXFrameworksBuildPhase section */
69 |
70 | /* Begin PBXGroup section */
71 | 9740EEB11CF90186004384FC /* Flutter */ = {
72 | isa = PBXGroup;
73 | children = (
74 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
75 | 3B80C3931E831B6300D905FE /* App.framework */,
76 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
77 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
78 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
79 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
80 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
81 | );
82 | name = Flutter;
83 | sourceTree = "";
84 | };
85 | 97C146E51CF9000F007C117D = {
86 | isa = PBXGroup;
87 | children = (
88 | 9740EEB11CF90186004384FC /* Flutter */,
89 | 97C146F01CF9000F007C117D /* Runner */,
90 | 97C146EF1CF9000F007C117D /* Products */,
91 | );
92 | sourceTree = "";
93 | };
94 | 97C146EF1CF9000F007C117D /* Products */ = {
95 | isa = PBXGroup;
96 | children = (
97 | 97C146EE1CF9000F007C117D /* Runner.app */,
98 | );
99 | name = Products;
100 | sourceTree = "";
101 | };
102 | 97C146F01CF9000F007C117D /* Runner */ = {
103 | isa = PBXGroup;
104 | children = (
105 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
106 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
107 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
108 | 97C147021CF9000F007C117D /* Info.plist */,
109 | 97C146F11CF9000F007C117D /* Supporting Files */,
110 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
111 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
112 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
113 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
114 | );
115 | path = Runner;
116 | sourceTree = "";
117 | };
118 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
119 | isa = PBXGroup;
120 | children = (
121 | );
122 | name = "Supporting Files";
123 | sourceTree = "";
124 | };
125 | /* End PBXGroup section */
126 |
127 | /* Begin PBXNativeTarget section */
128 | 97C146ED1CF9000F007C117D /* Runner */ = {
129 | isa = PBXNativeTarget;
130 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
131 | buildPhases = (
132 | 9740EEB61CF901F6004384FC /* Run Script */,
133 | 97C146EA1CF9000F007C117D /* Sources */,
134 | 97C146EB1CF9000F007C117D /* Frameworks */,
135 | 97C146EC1CF9000F007C117D /* Resources */,
136 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
137 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
138 | );
139 | buildRules = (
140 | );
141 | dependencies = (
142 | );
143 | name = Runner;
144 | productName = Runner;
145 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
146 | productType = "com.apple.product-type.application";
147 | };
148 | /* End PBXNativeTarget section */
149 |
150 | /* Begin PBXProject section */
151 | 97C146E61CF9000F007C117D /* Project object */ = {
152 | isa = PBXProject;
153 | attributes = {
154 | LastUpgradeCheck = 0910;
155 | ORGANIZATIONNAME = "The Chromium Authors";
156 | TargetAttributes = {
157 | 97C146ED1CF9000F007C117D = {
158 | CreatedOnToolsVersion = 7.3.1;
159 | LastSwiftMigration = 0910;
160 | };
161 | };
162 | };
163 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
164 | compatibilityVersion = "Xcode 3.2";
165 | developmentRegion = English;
166 | hasScannedForEncodings = 0;
167 | knownRegions = (
168 | en,
169 | Base,
170 | );
171 | mainGroup = 97C146E51CF9000F007C117D;
172 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
173 | projectDirPath = "";
174 | projectRoot = "";
175 | targets = (
176 | 97C146ED1CF9000F007C117D /* Runner */,
177 | );
178 | };
179 | /* End PBXProject section */
180 |
181 | /* Begin PBXResourcesBuildPhase section */
182 | 97C146EC1CF9000F007C117D /* Resources */ = {
183 | isa = PBXResourcesBuildPhase;
184 | buildActionMask = 2147483647;
185 | files = (
186 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
187 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
188 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
189 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
190 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
191 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
192 | );
193 | runOnlyForDeploymentPostprocessing = 0;
194 | };
195 | /* End PBXResourcesBuildPhase section */
196 |
197 | /* Begin PBXShellScriptBuildPhase section */
198 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
199 | isa = PBXShellScriptBuildPhase;
200 | buildActionMask = 2147483647;
201 | files = (
202 | );
203 | inputPaths = (
204 | );
205 | name = "Thin Binary";
206 | outputPaths = (
207 | );
208 | runOnlyForDeploymentPostprocessing = 0;
209 | shellPath = /bin/sh;
210 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
211 | };
212 | 9740EEB61CF901F6004384FC /* Run Script */ = {
213 | isa = PBXShellScriptBuildPhase;
214 | buildActionMask = 2147483647;
215 | files = (
216 | );
217 | inputPaths = (
218 | );
219 | name = "Run Script";
220 | outputPaths = (
221 | );
222 | runOnlyForDeploymentPostprocessing = 0;
223 | shellPath = /bin/sh;
224 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
225 | };
226 | /* End PBXShellScriptBuildPhase section */
227 |
228 | /* Begin PBXSourcesBuildPhase section */
229 | 97C146EA1CF9000F007C117D /* Sources */ = {
230 | isa = PBXSourcesBuildPhase;
231 | buildActionMask = 2147483647;
232 | files = (
233 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
234 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
235 | );
236 | runOnlyForDeploymentPostprocessing = 0;
237 | };
238 | /* End PBXSourcesBuildPhase section */
239 |
240 | /* Begin PBXVariantGroup section */
241 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
242 | isa = PBXVariantGroup;
243 | children = (
244 | 97C146FB1CF9000F007C117D /* Base */,
245 | );
246 | name = Main.storyboard;
247 | sourceTree = "";
248 | };
249 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
250 | isa = PBXVariantGroup;
251 | children = (
252 | 97C147001CF9000F007C117D /* Base */,
253 | );
254 | name = LaunchScreen.storyboard;
255 | sourceTree = "";
256 | };
257 | /* End PBXVariantGroup section */
258 |
259 | /* Begin XCBuildConfiguration section */
260 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
261 | isa = XCBuildConfiguration;
262 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
263 | buildSettings = {
264 | ALWAYS_SEARCH_USER_PATHS = NO;
265 | CLANG_ANALYZER_NONNULL = YES;
266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
267 | CLANG_CXX_LIBRARY = "libc++";
268 | CLANG_ENABLE_MODULES = YES;
269 | CLANG_ENABLE_OBJC_ARC = YES;
270 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
271 | CLANG_WARN_BOOL_CONVERSION = YES;
272 | CLANG_WARN_COMMA = YES;
273 | CLANG_WARN_CONSTANT_CONVERSION = YES;
274 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
275 | CLANG_WARN_EMPTY_BODY = YES;
276 | CLANG_WARN_ENUM_CONVERSION = YES;
277 | CLANG_WARN_INFINITE_RECURSION = YES;
278 | CLANG_WARN_INT_CONVERSION = YES;
279 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
280 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
281 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
282 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
283 | CLANG_WARN_STRICT_PROTOTYPES = YES;
284 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
285 | CLANG_WARN_UNREACHABLE_CODE = YES;
286 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
287 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
288 | COPY_PHASE_STRIP = NO;
289 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
290 | ENABLE_NS_ASSERTIONS = NO;
291 | ENABLE_STRICT_OBJC_MSGSEND = YES;
292 | GCC_C_LANGUAGE_STANDARD = gnu99;
293 | GCC_NO_COMMON_BLOCKS = YES;
294 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
295 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
296 | GCC_WARN_UNDECLARED_SELECTOR = YES;
297 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
298 | GCC_WARN_UNUSED_FUNCTION = YES;
299 | GCC_WARN_UNUSED_VARIABLE = YES;
300 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
301 | MTL_ENABLE_DEBUG_INFO = NO;
302 | SDKROOT = iphoneos;
303 | TARGETED_DEVICE_FAMILY = "1,2";
304 | VALIDATE_PRODUCT = YES;
305 | };
306 | name = Profile;
307 | };
308 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
309 | isa = XCBuildConfiguration;
310 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
311 | buildSettings = {
312 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
313 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
314 | DEVELOPMENT_TEAM = S8QB4VV633;
315 | ENABLE_BITCODE = NO;
316 | FRAMEWORK_SEARCH_PATHS = (
317 | "$(inherited)",
318 | "$(PROJECT_DIR)/Flutter",
319 | );
320 | INFOPLIST_FILE = Runner/Info.plist;
321 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
322 | LIBRARY_SEARCH_PATHS = (
323 | "$(inherited)",
324 | "$(PROJECT_DIR)/Flutter",
325 | );
326 | PRODUCT_BUNDLE_IDENTIFIER = jensklingenberg.de.jkFlutter;
327 | PRODUCT_NAME = "$(TARGET_NAME)";
328 | SWIFT_VERSION = 4.0;
329 | VERSIONING_SYSTEM = "apple-generic";
330 | };
331 | name = Profile;
332 | };
333 | 97C147031CF9000F007C117D /* Debug */ = {
334 | isa = XCBuildConfiguration;
335 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
336 | buildSettings = {
337 | ALWAYS_SEARCH_USER_PATHS = NO;
338 | CLANG_ANALYZER_NONNULL = YES;
339 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
340 | CLANG_CXX_LIBRARY = "libc++";
341 | CLANG_ENABLE_MODULES = YES;
342 | CLANG_ENABLE_OBJC_ARC = YES;
343 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
344 | CLANG_WARN_BOOL_CONVERSION = YES;
345 | CLANG_WARN_COMMA = YES;
346 | CLANG_WARN_CONSTANT_CONVERSION = YES;
347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
348 | CLANG_WARN_EMPTY_BODY = YES;
349 | CLANG_WARN_ENUM_CONVERSION = YES;
350 | CLANG_WARN_INFINITE_RECURSION = YES;
351 | CLANG_WARN_INT_CONVERSION = YES;
352 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = 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_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
402 | CLANG_WARN_EMPTY_BODY = YES;
403 | CLANG_WARN_ENUM_CONVERSION = YES;
404 | CLANG_WARN_INFINITE_RECURSION = YES;
405 | CLANG_WARN_INT_CONVERSION = YES;
406 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
407 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
408 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
409 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
410 | CLANG_WARN_STRICT_PROTOTYPES = YES;
411 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
412 | CLANG_WARN_UNREACHABLE_CODE = YES;
413 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
414 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
415 | COPY_PHASE_STRIP = NO;
416 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
417 | ENABLE_NS_ASSERTIONS = NO;
418 | ENABLE_STRICT_OBJC_MSGSEND = YES;
419 | GCC_C_LANGUAGE_STANDARD = gnu99;
420 | GCC_NO_COMMON_BLOCKS = YES;
421 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
422 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
423 | GCC_WARN_UNDECLARED_SELECTOR = YES;
424 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
425 | GCC_WARN_UNUSED_FUNCTION = YES;
426 | GCC_WARN_UNUSED_VARIABLE = YES;
427 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
428 | MTL_ENABLE_DEBUG_INFO = NO;
429 | SDKROOT = iphoneos;
430 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
431 | TARGETED_DEVICE_FAMILY = "1,2";
432 | VALIDATE_PRODUCT = YES;
433 | };
434 | name = Release;
435 | };
436 | 97C147061CF9000F007C117D /* Debug */ = {
437 | isa = XCBuildConfiguration;
438 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
439 | buildSettings = {
440 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
441 | CLANG_ENABLE_MODULES = YES;
442 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
443 | ENABLE_BITCODE = NO;
444 | FRAMEWORK_SEARCH_PATHS = (
445 | "$(inherited)",
446 | "$(PROJECT_DIR)/Flutter",
447 | );
448 | INFOPLIST_FILE = Runner/Info.plist;
449 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
450 | LIBRARY_SEARCH_PATHS = (
451 | "$(inherited)",
452 | "$(PROJECT_DIR)/Flutter",
453 | );
454 | PRODUCT_BUNDLE_IDENTIFIER = jensklingenberg.de.jkFlutter;
455 | PRODUCT_NAME = "$(TARGET_NAME)";
456 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
457 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
458 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
459 | SWIFT_VERSION = 4.0;
460 | VERSIONING_SYSTEM = "apple-generic";
461 | };
462 | name = Debug;
463 | };
464 | 97C147071CF9000F007C117D /* Release */ = {
465 | isa = XCBuildConfiguration;
466 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
467 | buildSettings = {
468 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
469 | CLANG_ENABLE_MODULES = YES;
470 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
471 | ENABLE_BITCODE = NO;
472 | FRAMEWORK_SEARCH_PATHS = (
473 | "$(inherited)",
474 | "$(PROJECT_DIR)/Flutter",
475 | );
476 | INFOPLIST_FILE = Runner/Info.plist;
477 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
478 | LIBRARY_SEARCH_PATHS = (
479 | "$(inherited)",
480 | "$(PROJECT_DIR)/Flutter",
481 | );
482 | PRODUCT_BUNDLE_IDENTIFIER = jensklingenberg.de.jkFlutter;
483 | PRODUCT_NAME = "$(TARGET_NAME)";
484 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
485 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
486 | SWIFT_VERSION = 4.0;
487 | VERSIONING_SYSTEM = "apple-generic";
488 | };
489 | name = Release;
490 | };
491 | /* End XCBuildConfiguration section */
492 |
493 | /* Begin XCConfigurationList section */
494 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
495 | isa = XCConfigurationList;
496 | buildConfigurations = (
497 | 97C147031CF9000F007C117D /* Debug */,
498 | 97C147041CF9000F007C117D /* Release */,
499 | 249021D3217E4FDB00AE95B9 /* Profile */,
500 | );
501 | defaultConfigurationIsVisible = 0;
502 | defaultConfigurationName = Release;
503 | };
504 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
505 | isa = XCConfigurationList;
506 | buildConfigurations = (
507 | 97C147061CF9000F007C117D /* Debug */,
508 | 97C147071CF9000F007C117D /* Release */,
509 | 249021D4217E4FDB00AE95B9 /* Profile */,
510 | );
511 | defaultConfigurationIsVisible = 0;
512 | defaultConfigurationName = Release;
513 | };
514 | /* End XCConfigurationList section */
515 |
516 | };
517 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
518 | }
519 |
--------------------------------------------------------------------------------