Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6448391
migrate by command
Sep 24, 2021
7dfb049
update null-safety
Sep 24, 2021
00a58ef
update
Sep 24, 2021
cba181e
update
Sep 24, 2021
86d2ed0
update
Sep 24, 2021
ed937e7
update
Sep 24, 2021
114db84
update
Sep 24, 2021
7ecc529
migrate command examples
Sep 24, 2021
25d8256
update example
Sep 24, 2021
3d3493c
update
Sep 25, 2021
ee37715
update gitignore
Sep 25, 2021
4449760
update
Sep 28, 2021
b81461c
fix OptimizedGestureDetector
Sep 28, 2021
e3dd529
Merge pull request Null safety
absar Nov 1, 2021
d034d79
Null safety updates.
absar Feb 6, 2022
895bc49
* Flutter 3 fixes.
absar May 15, 2022
ae78cdc
Flutter 3.3 fixes
absar Oct 16, 2022
f392a8b
Upgrade dependencies path_provider, screenshot, url_launcher, permiss…
absar Mar 13, 2023
703ab48
Disable image saver(image_gallery_saver) for now, as it's using a ver…
absar Mar 13, 2023
6f3f86f
* Flutter 3.7 updates
absar Mar 17, 2023
3fa7dce
BarLineChartBasePainter getData, getAxisRange getter improvements
absar Mar 17, 2023
6ff54a7
Bump sdk constraints to >=2.18.0
absar Mar 20, 2023
6544e29
Upgrade dependencies path_provider, url_launcher
absar Jun 3, 2023
385d9c4
Flutter 3.10 updates
absar Jun 11, 2023
4e5915b
Update sdk constraints to >=3.0.0 <4.0.0
absar Oct 27, 2023
73483e1
Rename Easing to MpEasing to not conflict with Flutter Easing
absar Dec 21, 2023
50f99da
* Flutter 3.22 updates
absar Aug 31, 2024
5740833
* Update example Gradle to 8.2 DSL
absar Sep 19, 2024
36b3ab1
Example app: Upgrade kotlin plugin from 1.7.20 to 1.8.22 and Gradle f…
absar Oct 7, 2024
252f9ed
* Flutter 3.32 updates
absar Aug 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ pubspec.lock
**/ios/Flutter/flutter_assets/
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
**/ios/Flutter/Flutter.podspec

# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
mp_chart/.flutter-plugins-dependencies
8 changes: 6 additions & 2 deletions mp_chart/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
*.iml
Expand All @@ -22,12 +25,13 @@

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.packages
.flutter-plugins-dependencies
.pub-cache/
.pub/
build/
/build/

# Android related
**/android/**/gradle-wrapper.jar
Expand Down
52 changes: 52 additions & 0 deletions mp_chart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
## 1.8.0 2025-08-04
* Flutter 3.32 updates
* Upgrade dependencies
## 1.7.1 2024-10-08
* Example app: Upgrade kotlin plugin from 1.7.20 to 1.8.22 and Gradle from 8.2 to 8.3, to sync it with Flutter 3.24
## 1.7.0 2024-09-20
* Update example Gradle to 8.2 DSL
* BREAKING: Update minimum supported Flutter to 3.22, Dart to 3.3
## 1.6.0 2024-08-31
* Flutter 3.22 updates
* Upgrade dependencies path_provider, screenshot
* Upgrade example app dependencies url_launcher , permission_handler, cupertino_icons
## 1.5.0 2023-12-21
* Rename Easing to MpEasing to not conflict with Flutter Easing
* Export most classes in mp_chart so that users only import mp_chart instead of individual classes
* Flutter 3.16 updates
* Upgrade dependencies intl
* Upgrade example app dependencies url_launcher, permission_handler, intl
## 1.4.0 2023-10-27
* Update sdk constraints to >=3.0.0 <4.0.0
* Upgrade dependencies intl, path_provider
* Upgrade example app dependencies url_launcher, permission_handler, cupertino_icons, intl
## 1.3.0 2023-06-11
* Flutter 3.10 updates
* Upgrade dependencies intl, screenshot, permission_handler
## 1.2.2 2023-06-03
* Upgrade dependencies path_provider, url_launcher
## 1.2.1 2023-03-17
* Flutter 3.7 updates
* Null safety cleanups
* BarLineChartBasePainter getData, getAxisRange getter improvements
* Upgrade dependency vector_math
* Bump sdk constraints to >=2.18.0
## 1.2.0 2023-03-13
* Disable image saver(image_gallery_saver) for now, as it's using a very old kotlin-gradle-plugin
## 1.1.0 2023-03-13
* Upgrade dependencies path_provider, screenshot, url_launcher, permission_handler
## 1.0.0 2022-10-16
* Flutter 3.3 fixes
* Upgrade dependencies path_provider, path_drawing, optimized_gesture_detector
* bump sdk from >=2.12.0 to >=2.17.0
* Example app:
** Upgrade dependencies, url_launcher, permission_handler, cupertino_icons
## 0.3.3 2022-05-16
* Flutter 3 fixes.
* Upgrade dependencies path_provider, vector_math.
* Example app:
** Use Uri instead of deprecated String in launchUrl
** Upgrade dependencies, url_launcher, permission_handler
## 0.3.2 2022-02-06
* Null safety updates.
* Upgrade dependencies.
## 0.3.1 2020-10-30
* Updated for Flutter 1.22.0 to use updated Dart intl package 0.17.0-nullsafety.1.
## 0.3.0 2020-09-18
Expand Down
34 changes: 21 additions & 13 deletions mp_chart/example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,21 +22,28 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28
namespace "com.lqy.example"
compileSdkVersion flutter.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = '11'
}

lintOptions {
disable 'InvalidPackage'
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.lqy.example"
minSdkVersion 16
targetSdkVersion 28
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down
3 changes: 2 additions & 1 deletion mp_chart/example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:exported="true">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
Expand Down
15 changes: 2 additions & 13 deletions mp_chart/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand All @@ -24,6 +13,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
31 changes: 21 additions & 10 deletions mp_chart/example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.7.3' apply false
id "org.jetbrains.kotlin.android" version "2.1.0" apply false
}

include ":app"
2 changes: 1 addition & 1 deletion mp_chart/example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>9.0</string>
</dict>
</plist>
32 changes: 32 additions & 0 deletions mp_chart/example/ios/Flutter/ephemeral/flutter_lldb_helper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Generated file, do not edit.
#

import lldb

def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict):
"""Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages."""
base = frame.register["x0"].GetValueAsAddress()
page_len = frame.register["x1"].GetValueAsUnsigned()

# Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the
# first page to see if handled it correctly. This makes diagnosing
# misconfiguration (e.g. missing breakpoint) easier.
data = bytearray(page_len)
data[0:8] = b'IHELPED!'

error = lldb.SBError()
frame.GetThread().GetProcess().WriteMemory(base, data, error)
if not error.Success():
print(f'Failed to write into {base}[+{page_len}]', error)
return

def __lldb_init_module(debugger: lldb.SBDebugger, _):
target = debugger.GetDummyTarget()
# Caveat: must use BreakpointCreateByRegEx here and not
# BreakpointCreateByName. For some reasons callback function does not
# get carried over from dummy target for the later.
bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$")
bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__))
bp.SetAutoContinue(True)
print("-- LLDB integration loaded --")
5 changes: 5 additions & 0 deletions mp_chart/example/ios/Flutter/ephemeral/flutter_lldbinit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#
# Generated file, do not edit.
#

command script import --relative-to-command-file flutter_lldb_helper.py
67 changes: 18 additions & 49 deletions mp_chart/example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,63 +10,32 @@ project 'Runner', {
'Release' => :release,
}

def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

target 'Runner' do
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
flutter_ios_podfile_setup

# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
target 'Runner' do
use_frameworks!
use_modular_headers!

# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
flutter_additional_ios_build_settings(target)
end
end
Loading