Skip to content

Commit 303ca1f

Browse files
committed
v3.0.0
1 parent 83c3951 commit 303ca1f

Some content is hidden

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

57 files changed

+1751
-121
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.buildlog/
99
.history
1010
.svn/
11+
migrate_working_dir/
1112

1213
# IntelliJ related
1314
*.iml

Diff for: .metadata

+37-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,45 @@
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 and should not be manually edited.
4+
# This file should be version controlled.
55

66
version:
7-
revision: 5464c5bac742001448fe4fc0597be939379f88ea
7+
revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
88
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: ee4e09cce01d6f2d7f4baebd247fde02e5008851
17+
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
18+
- platform: android
19+
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
20+
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
21+
- platform: ios
22+
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
23+
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
24+
- platform: linux
25+
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
26+
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
27+
- platform: macos
28+
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
29+
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
30+
- platform: web
31+
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
32+
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
33+
- platform: windows
34+
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
35+
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
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'

Diff for: README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ This project is a starting point for a Flutter application.
88

99
A few resources to get you started if this is your first Flutter project:
1010

11-
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12-
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
11+
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
1313

14-
For help getting started with Flutter, view our
15-
[online documentation](https://flutter.dev/docs), which offers tutorials,
14+
For help getting started with Flutter development, view the
15+
[online documentation](https://docs.flutter.dev/), which offers tutorials,
1616
samples, guidance on mobile development, and a full API reference.

Diff for: android/app/build.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
2929
compileSdkVersion flutter.compileSdkVersion
30+
ndkVersion flutter.ndkVersion
3031

3132
compileOptions {
3233
sourceCompatibility JavaVersion.VERSION_1_8
@@ -44,6 +45,8 @@ android {
4445
defaultConfig {
4546
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
4647
applicationId "com.example.flutter_evolution"
48+
// You can update the following values to match your application needs.
49+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
4750
minSdkVersion flutter.minSdkVersion
4851
targetSdkVersion flutter.targetSdkVersion
4952
versionCode flutterVersionCode.toInteger()

Diff for: android/app/src/debug/AndroidManifest.xml

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

Diff for: android/app/src/main/res/values-night/styles.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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.

Diff for: android/app/src/main/res/values/styles.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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.

Diff for: android/app/src/profile/AndroidManifest.xml

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

Diff for: android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.1.0'
9+
classpath 'com.android.tools.build:gradle:7.1.2'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

Diff for: android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

Diff for: ios/Flutter/flutter_export_environment.sh

-13
This file was deleted.

Diff for: ios/Runner/Info.plist

+2
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,7 @@
4343
</array>
4444
<key>UIViewControllerBasedStatusBarAppearance</key>
4545
<false/>
46+
<key>CADisableMinimumFrameDurationOnPhone</key>
47+
<true/>
4648
</dict>
4749
</plist>

Diff for: linux/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flutter/ephemeral

Diff for: linux/CMakeLists.txt

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Project-level configuration.
2+
cmake_minimum_required(VERSION 3.10)
3+
project(runner LANGUAGES CXX)
4+
5+
# The name of the executable created for the application. Change this to change
6+
# the on-disk name of your application.
7+
set(BINARY_NAME "flutter_evolution")
8+
# The unique GTK application identifier for this application. See:
9+
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
10+
set(APPLICATION_ID "com.example.flutter_evolution")
11+
12+
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
13+
# versions of CMake.
14+
cmake_policy(SET CMP0063 NEW)
15+
16+
# Load bundled libraries from the lib/ directory relative to the binary.
17+
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
18+
19+
# Root filesystem for cross-building.
20+
if(FLUTTER_TARGET_PLATFORM_SYSROOT)
21+
set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
22+
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
23+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
24+
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
25+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
26+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
27+
endif()
28+
29+
# Define build configuration options.
30+
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
31+
set(CMAKE_BUILD_TYPE "Debug" CACHE
32+
STRING "Flutter build mode" FORCE)
33+
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
34+
"Debug" "Profile" "Release")
35+
endif()
36+
37+
# Compilation settings that should be applied to most targets.
38+
#
39+
# Be cautious about adding new options here, as plugins use this function by
40+
# default. In most cases, you should add new options to specific targets instead
41+
# of modifying this function.
42+
function(APPLY_STANDARD_SETTINGS TARGET)
43+
target_compile_features(${TARGET} PUBLIC cxx_std_14)
44+
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
45+
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
46+
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
47+
endfunction()
48+
49+
# Flutter library and tool build rules.
50+
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
51+
add_subdirectory(${FLUTTER_MANAGED_DIR})
52+
53+
# System-level dependencies.
54+
find_package(PkgConfig REQUIRED)
55+
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
56+
57+
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
58+
59+
# Define the application target. To change its name, change BINARY_NAME above,
60+
# not the value here, or `flutter run` will no longer work.
61+
#
62+
# Any new source files that you add to the application should be added here.
63+
add_executable(${BINARY_NAME}
64+
"main.cc"
65+
"my_application.cc"
66+
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
67+
)
68+
69+
# Apply the standard set of build settings. This can be removed for applications
70+
# that need different build settings.
71+
apply_standard_settings(${BINARY_NAME})
72+
73+
# Add dependency libraries. Add any application-specific dependencies here.
74+
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
75+
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
76+
77+
# Run the Flutter tool portions of the build. This must not be removed.
78+
add_dependencies(${BINARY_NAME} flutter_assemble)
79+
80+
# Only the install-generated bundle's copy of the executable will launch
81+
# correctly, since the resources must in the right relative locations. To avoid
82+
# people trying to run the unbundled copy, put it in a subdirectory instead of
83+
# the default top-level location.
84+
set_target_properties(${BINARY_NAME}
85+
PROPERTIES
86+
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
87+
)
88+
89+
# Generated plugin build rules, which manage building the plugins and adding
90+
# them to the application.
91+
include(flutter/generated_plugins.cmake)
92+
93+
94+
# === Installation ===
95+
# By default, "installing" just makes a relocatable bundle in the build
96+
# directory.
97+
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
98+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
99+
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
100+
endif()
101+
102+
# Start with a clean build bundle directory every time.
103+
install(CODE "
104+
file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
105+
" COMPONENT Runtime)
106+
107+
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
108+
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
109+
110+
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
111+
COMPONENT Runtime)
112+
113+
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
114+
COMPONENT Runtime)
115+
116+
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
117+
COMPONENT Runtime)
118+
119+
foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
120+
install(FILES "${bundled_library}"
121+
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
122+
COMPONENT Runtime)
123+
endforeach(bundled_library)
124+
125+
# Fully re-copy the assets directory on each build to avoid having stale files
126+
# from a previous install.
127+
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
128+
install(CODE "
129+
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
130+
" COMPONENT Runtime)
131+
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
132+
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
133+
134+
# Install the AOT library on non-Debug builds only.
135+
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
136+
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
137+
COMPONENT Runtime)
138+
endif()

Diff for: linux/flutter/CMakeLists.txt

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# This file controls Flutter-level build steps. It should not be edited.
2+
cmake_minimum_required(VERSION 3.10)
3+
4+
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5+
6+
# Configuration provided via flutter tool.
7+
include(${EPHEMERAL_DIR}/generated_config.cmake)
8+
9+
# TODO: Move the rest of this into files in ephemeral. See
10+
# https://github.com/flutter/flutter/issues/57146.
11+
12+
# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
13+
# which isn't available in 3.10.
14+
function(list_prepend LIST_NAME PREFIX)
15+
set(NEW_LIST "")
16+
foreach(element ${${LIST_NAME}})
17+
list(APPEND NEW_LIST "${PREFIX}${element}")
18+
endforeach(element)
19+
set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
20+
endfunction()
21+
22+
# === Flutter Library ===
23+
# System-level dependencies.
24+
find_package(PkgConfig REQUIRED)
25+
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
26+
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
27+
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
28+
29+
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
30+
31+
# Published to parent scope for install step.
32+
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
33+
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
34+
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
35+
set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
36+
37+
list(APPEND FLUTTER_LIBRARY_HEADERS
38+
"fl_basic_message_channel.h"
39+
"fl_binary_codec.h"
40+
"fl_binary_messenger.h"
41+
"fl_dart_project.h"
42+
"fl_engine.h"
43+
"fl_json_message_codec.h"
44+
"fl_json_method_codec.h"
45+
"fl_message_codec.h"
46+
"fl_method_call.h"
47+
"fl_method_channel.h"
48+
"fl_method_codec.h"
49+
"fl_method_response.h"
50+
"fl_plugin_registrar.h"
51+
"fl_plugin_registry.h"
52+
"fl_standard_message_codec.h"
53+
"fl_standard_method_codec.h"
54+
"fl_string_codec.h"
55+
"fl_value.h"
56+
"fl_view.h"
57+
"flutter_linux.h"
58+
)
59+
list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
60+
add_library(flutter INTERFACE)
61+
target_include_directories(flutter INTERFACE
62+
"${EPHEMERAL_DIR}"
63+
)
64+
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
65+
target_link_libraries(flutter INTERFACE
66+
PkgConfig::GTK
67+
PkgConfig::GLIB
68+
PkgConfig::GIO
69+
)
70+
add_dependencies(flutter flutter_assemble)
71+
72+
# === Flutter tool backend ===
73+
# _phony_ is a non-existent file to force this command to run every time,
74+
# since currently there's no way to get a full input/output list from the
75+
# flutter tool.
76+
add_custom_command(
77+
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
78+
${CMAKE_CURRENT_BINARY_DIR}/_phony_
79+
COMMAND ${CMAKE_COMMAND} -E env
80+
${FLUTTER_TOOL_ENVIRONMENT}
81+
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
82+
${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
83+
VERBATIM
84+
)
85+
add_custom_target(flutter_assemble DEPENDS
86+
"${FLUTTER_LIBRARY}"
87+
${FLUTTER_LIBRARY_HEADERS}
88+
)

0 commit comments

Comments
 (0)