Skip to content

Commit 5f68a63

Browse files
committed
Add new sample template
1 parent 9f1d2fc commit 5f68a63

File tree

82 files changed

+2777
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2777
-133
lines changed

example/.metadata

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
11
# This file tracks properties of this Flutter project.
22
# Used by Flutter tool to assess capabilities and perform upgrades etc.
33
#
4-
# This file should be version controlled.
4+
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: 85684f9300908116a78138ea4c6036c35c9a1236
8-
channel: stable
7+
revision: "5dcb86f68f239346676ceb1ed1ea385bd215fba1"
8+
channel: "stable"
99

1010
project_type: app
1111

1212
# Tracks metadata for the flutter migrate command
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
17-
base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
16+
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
17+
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
18+
- platform: android
19+
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
20+
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
21+
- platform: ios
22+
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
23+
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
24+
- platform: macos
25+
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
26+
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
1827
- platform: web
19-
create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
20-
base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
28+
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
29+
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
30+
- platform: windows
31+
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
32+
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
2133

2234
# User provided section
2335

example/android/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
99
# Remember to never publicly share your keystore.
1010
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
1111
key.properties
12+
**/*.keystore
13+
**/*.jks

example/android/app/build.gradle

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,57 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id "dev.flutter.flutter-gradle-plugin"
6+
}
7+
18
def localProperties = new Properties()
2-
def localPropertiesFile = rootProject.file('local.properties')
9+
def localPropertiesFile = rootProject.file("local.properties")
310
if (localPropertiesFile.exists()) {
4-
localPropertiesFile.withReader('UTF-8') { reader ->
11+
localPropertiesFile.withReader("UTF-8") { reader ->
512
localProperties.load(reader)
613
}
714
}
815

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')
16+
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
1517
if (flutterVersionCode == null) {
16-
flutterVersionCode = '1'
18+
flutterVersionCode = "1"
1719
}
1820

19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
21+
def flutterVersionName = localProperties.getProperty("flutter.versionName")
2022
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
23+
flutterVersionName = "1.0"
2224
}
2325

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
2826
android {
29-
compileSdkVersion 31
27+
namespace = "dev.danvickmiller.formbuildervalidators.example"
28+
compileSdk = flutter.compileSdkVersion
29+
ndkVersion = flutter.ndkVersion
3030

31-
sourceSets {
32-
main.java.srcDirs += 'src/main/kotlin'
31+
compileOptions {
32+
sourceCompatibility = JavaVersion.VERSION_1_8
33+
targetCompatibility = JavaVersion.VERSION_1_8
3334
}
3435

3536
defaultConfig {
36-
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37-
applicationId "dev.danvickmiller.formbuildervalidators.example"
38-
minSdkVersion flutter.minSdkVersion
39-
targetSdkVersion 30
40-
versionCode flutterVersionCode.toInteger()
41-
versionName flutterVersionName
37+
applicationId = "dev.danvickmiller.formbuildervalidators.example"
38+
// You can update the following values to match your application needs.
39+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
40+
minSdk = flutter.minSdkVersion
41+
targetSdk = flutter.targetSdkVersion
42+
versionCode = flutterVersionCode.toInteger()
43+
versionName = flutterVersionName
4244
}
4345

4446
buildTypes {
4547
release {
4648
// TODO: Add your own signing config for the release build.
4749
// Signing with the debug keys for now, so `flutter run --release` works.
48-
signingConfig signingConfigs.debug
50+
signingConfig = signingConfigs.debug
4951
}
5052
}
51-
namespace 'dev.danvickmiller.formbuildervalidators.example'
5253
}
5354

5455
flutter {
55-
source '../..'
56-
}
57-
58-
dependencies {
59-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
56+
source = "../.."
6057
}

example/android/app/src/debug/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2-
<!-- Flutter needs it to communicate with the running application
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
34
to allow setting breakpoints, to provide hot reload, etc.
45
-->
56
<uses-permission android:name="android.permission.INTERNET"/>
Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2-
<application
2+
<application
33
android:label="example"
4+
android:name="${applicationName}"
45
android:icon="@mipmap/ic_launcher">
56
<activity
67
android:name=".MainActivity"
8+
android:exported="true"
79
android:launchMode="singleTop"
10+
android:taskAffinity=""
811
android:theme="@style/LaunchTheme"
912
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1013
android:hardwareAccelerated="true"
@@ -17,15 +20,6 @@
1720
android:name="io.flutter.embedding.android.NormalTheme"
1821
android:resource="@style/NormalTheme"
1922
/>
20-
<!-- Displays an Android View that continues showing the launch screen
21-
Drawable until Flutter paints its first frame, then this splash
22-
screen fades out. A splash screen is useful to avoid any visual
23-
gap between the end of Android's launch screen and the painting of
24-
Flutter's first frame. -->
25-
<meta-data
26-
android:name="io.flutter.embedding.android.SplashScreenDrawable"
27-
android:resource="@drawable/launch_background"
28-
/>
2923
<intent-filter>
3024
<action android:name="android.intent.action.MAIN"/>
3125
<category android:name="android.intent.category.LAUNCHER"/>
@@ -37,4 +31,15 @@
3731
android:name="flutterEmbedding"
3832
android:value="2" />
3933
</application>
34+
<!-- Required to query activities that can process text, see:
35+
https://developer.android.com/training/package-visibility and
36+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
37+
38+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
39+
<queries>
40+
<intent>
41+
<action android:name="android.intent.action.PROCESS_TEXT"/>
42+
<data android:mimeType="text/plain"/>
43+
</intent>
44+
</queries>
4045
</manifest>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.example.example
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity()

example/android/app/src/main/kotlin/dev/danvickmiller/formbuildervalidators/example/MainActivity.kt

Lines changed: 0 additions & 6 deletions
This file was deleted.

example/android/app/src/main/res/values-night/styles.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
44
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
6-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
88
</style>
99
<!-- Theme applied to the Android Window as soon as the process has started.
1010
This theme determines the color of the Android Window while your
1111
Flutter UI initializes, as well as behind your Flutter UI while its
1212
running.
13-
13+
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
1515
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
1616
<item name="android:windowBackground">?android:colorBackground</item>

example/android/app/src/main/res/values/styles.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
44
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
6-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
88
</style>
99
<!-- Theme applied to the Android Window as soon as the process has started.
1010
This theme determines the color of the Android Window while your
1111
Flutter UI initializes, as well as behind your Flutter UI while its
1212
running.
13-
13+
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
1515
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
1616
<item name="android:windowBackground">?android:colorBackground</item>

example/android/app/src/profile/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2-
<!-- Flutter needs it to communicate with the running application
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
34
to allow setting breakpoints, to provide hot reload, etc.
45
-->
56
<uses-permission android:name="android.permission.INTERNET"/>

0 commit comments

Comments
 (0)