Skip to content

Commit f5cf50c

Browse files
authored
Chores: Update example, widen flutter_lints constraints, update version and changelog (#46)
1 parent 8b08533 commit f5cf50c

Some content is hidden

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

64 files changed

+1903
-88
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [1.5.1]
2+
3+
* Update example app.
4+
* Widen `flutter_lints` constraints.
5+
16
## [1.5.0]
27

38
* Add `showPalette` to `WheelPicker`.

example/.metadata

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,42 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: 985ccb6d14c6ce5ce74823a4d366df2438eac44f
8-
channel: beta
7+
revision: "a14f74ff3a1cbd521163c5f03d68113d50af93d3"
8+
channel: "stable"
99

1010
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
17+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
18+
- platform: android
19+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
20+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
21+
- platform: ios
22+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
23+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
24+
- platform: linux
25+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
26+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
27+
- platform: macos
28+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
29+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
30+
- platform: web
31+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
32+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
33+
- platform: windows
34+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
35+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

example/android/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
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,61 +1,58 @@
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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26-
2726
android {
28-
compileSdkVersion 33
27+
namespace = "com.example.example"
28+
compileSdk = flutter.compileSdkVersion
29+
ndkVersion = flutter.ndkVersion
2930

30-
lintOptions {
31-
disable 'InvalidPackage'
31+
compileOptions {
32+
sourceCompatibility = JavaVersion.VERSION_17
33+
targetCompatibility = JavaVersion.VERSION_17
3234
}
3335

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

4447
buildTypes {
4548
release {
4649
// TODO: Add your own signing config for the release build.
4750
// Signing with the debug keys for now, so `flutter run --release` works.
48-
signingConfig signingConfigs.debug
51+
signingConfig = signingConfigs.debug
4952
}
5053
}
5154
}
5255

5356
flutter {
54-
source '../..'
55-
}
56-
57-
dependencies {
58-
testImplementation 'junit:junit:4.13.2'
59-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
60-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
57+
source = "../.."
6158
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,45 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.flutterhsvcolorpickerexample">
3-
4-
<!-- The INTERNET permission is required for development. Specifically,
5-
flutter needs it to communicate with the running application
6-
to allow setting breakpoints, to provide hot reload, etc.
7-
-->
8-
<uses-permission android:name="android.permission.INTERNET"/>
9-
10-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
11-
calls FlutterMain.startInitialization(this); in its onCreate method.
12-
In most cases you can leave this as-is, but you if you want to provide
13-
additional functionality it is fine to subclass or reimplement
14-
FlutterApplication and put your custom class here. -->
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
152
<application
16-
android:label="flutter_hsvcolor_picker_example"
3+
android:label="example"
4+
android:name="${applicationName}"
175
android:icon="@mipmap/ic_launcher">
186
<activity
197
android:name=".MainActivity"
8+
android:exported="true"
209
android:launchMode="singleTop"
10+
android:taskAffinity=""
2111
android:theme="@style/LaunchTheme"
22-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
12+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
2313
android:hardwareAccelerated="true"
2414
android:windowSoftInputMode="adjustResize">
15+
<!-- Specifies an Android theme to apply to this Activity as soon as
16+
the Android process has started. This theme is visible to the user
17+
while the Flutter UI initializes. After that, this theme continues
18+
to determine the Window background behind the Flutter UI. -->
19+
<meta-data
20+
android:name="io.flutter.embedding.android.NormalTheme"
21+
android:resource="@style/NormalTheme"
22+
/>
2523
<intent-filter>
2624
<action android:name="android.intent.action.MAIN"/>
2725
<category android:name="android.intent.category.LAUNCHER"/>
2826
</intent-filter>
2927
</activity>
28+
<!-- Don't delete the meta-data below.
29+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
3030
<meta-data
3131
android:name="flutterEmbedding"
3232
android:value="2" />
3333
</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>
3445
</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()
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5+
<!-- Show a splash screen on the activity. Automatically removed when
6+
the Flutter engine draws its first frame -->
7+
<item name="android:windowBackground">@drawable/launch_background</item>
8+
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
18+
</resources>
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
45
<!-- Show a splash screen on the activity. Automatically removed when
5-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
67
<item name="android:windowBackground">@drawable/launch_background</item>
78
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
818
</resources>

0 commit comments

Comments
 (0)