Skip to content

Commit 20b6282

Browse files
committed
Merge branch 'main' of https://github.com/flutter/codelabs into flutter-3.30
2 parents 6d62ce4 + 7661a0c commit 20b6282

File tree

193 files changed

+3909
-1596
lines changed

Some content is hidden

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

193 files changed

+3909
-1596
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# */**/ios
66
# */**/.gitignore
77
*/**/.metadata
8+
*/**/android/app/.cxx
89

910
.dart_tool/
1011

homescreen_codelab/codelab_rebuild.yaml

Lines changed: 2201 additions & 0 deletions
Large diffs are not rendered by default.

homescreen_codelab/step_03/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related
@@ -27,7 +29,6 @@ migrate_working_dir/
2729
.dart_tool/
2830
.flutter-plugins
2931
.flutter-plugins-dependencies
30-
.packages
3132
.pub-cache/
3233
.pub/
3334
/build/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "homescreen_widgets",
9+
"request": "launch",
10+
"type": "dart"
11+
}
12+
]
13+
}

homescreen_codelab/step_03/android/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
# See https://flutter.dev/to/reference-keystore
1112
key.properties
1213
**/*.keystore
1314
**/*.jks

homescreen_codelab/step_03/android/app/build.gradle

Lines changed: 0 additions & 69 deletions
This file was deleted.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
plugins {
2+
id("com.android.application")
3+
id("kotlin-android")
4+
id("dev.flutter.flutter-gradle-plugin")
5+
}
6+
7+
android {
8+
namespace = "com.mydomain.homescreen_widgets"
9+
compileSdk = flutter.compileSdkVersion
10+
// required by path_provider_android and shared_preferences_android
11+
ndkVersion = "27.0.12077973"
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_11
15+
targetCompatibility = JavaVersion.VERSION_11
16+
}
17+
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_11.toString()
20+
}
21+
22+
defaultConfig {
23+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24+
applicationId = "com.mydomain.homescreen_widgets"
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
31+
}
32+
33+
buildTypes {
34+
release {
35+
// TODO: Add your own signing config for the release build.
36+
// Signing with the debug keys for now, so `flutter run --release` works.
37+
signingConfig = signingConfigs.getByName("debug")
38+
}
39+
}
40+
buildFeatures {
41+
viewBinding = true
42+
}
43+
}
44+
45+
flutter {
46+
source = "../.."
47+
}

homescreen_codelab/step_03/android/app/src/main/AndroidManifest.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
22
<application
3-
android:label="home_widget_codelab"
3+
android:label="homescreen_widgets"
44
android:name="${applicationName}"
55
android:icon="@mipmap/ic_launcher">
66
<activity
77
android:name=".MainActivity"
88
android:exported="true"
99
android:launchMode="singleTop"
10+
android:taskAffinity=""
1011
android:theme="@style/LaunchTheme"
1112
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1213
android:hardwareAccelerated="true"
@@ -30,4 +31,15 @@
3031
android:name="flutterEmbedding"
3132
android:value="2" />
3233
</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>
3345
</manifest>

homescreen_codelab/step_03/android/app/src/main/kotlin/com/mydomain/homescreen_widgets/MainActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ package com.mydomain.homescreen_widgets
22

33
import io.flutter.embedding.android.FlutterActivity
44

5-
class MainActivity: FlutterActivity() {
6-
}
5+
class MainActivity : FlutterActivity()

homescreen_codelab/step_03/android/build.gradle

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

0 commit comments

Comments
 (0)