1
0
mirror of https://github.com/nisrulz/flutter-examples.git synced 2026-08-25 09:13:00 +00:00

chore: modernize Flutter examples — null safety, latest APIs, Kotlin DSL Gradle (#148)

* updates

* Update Gradle wrapper script to fetch latest version online and allow --version override

* chore(analytics_integration): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build files to Kotlin DSL and bump Gradle wrapper.

* chore(animation_example): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build files to Kotlin DSL.

* chore(biometrics): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build files to Kotlin DSL.

* chore(bmi_calculator): test

test body

* chore(bottom_sheet): test

test body

* chore(custom_home_drawer): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build files to Kotlin DSL and bump Gradle wrapper.

* chore(covid19_mobile_app): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(dropdown_button): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(enabling_splash_screen): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(expense_planner): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(firebase_crash_reporting): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(firebase_google_authentication): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(flutter_date_pickers-master): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(getx_counter_app): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(google_signin): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(grid_layout): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(handling_routes): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(image_editor): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(image_from_network): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(infinite_list): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(load_local_image): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(load_local_json): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(lunch_app): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(navigation_drawer): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(news_memes_app): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(persist_key_value): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(push_notifications): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(save_data_locally_with_sqlite): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(scan_qr_code): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(simple_material_app): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(sliver_app_bar_example): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(stateful_widget): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(stateless_widgets): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(statless_counter_app): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(tic_tac_toe): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(tip_calculator): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(todo_list_using_provider): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(unit_testing): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(using_alert_dialog): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(using_bottom_nav_bar): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(using_custom_fonts): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(using_edittext): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(using_expansionpanel): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(using_firebase_db): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(using_gradient): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(using_http_get): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(using_interactiveviewer): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(using_listview): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(using_listwheelscrollview): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(using_platform_adaptive): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore(using_snackbar): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(using_stepper): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(using_tabs): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(using_theme): remove legacy nested android project

Delete the redundant nested android/ project directory from the old layout. Also update pubspec.yaml SDK constraints and dependencies.

* chore(view_pdf_file): migrate Gradle build scripts to Kotlin DSL

Convert Groovy build.gradle/settings.gradle to Kotlin DSL and bump Gradle wrapper.

* chore: ignore .trash directory

* chore: remove IDE configs and PR template

* chore(infinite_list): remove legacy nested android project

* refactor(infinite_list): migrate theme to ColorScheme API

* refactor(using_theme): migrate to ColorScheme API

* refactor(analytics_integration): migrate Firebase Analytics API

* refactor(firebase_google_authentication): migrate Google Sign-In API

* refactor(covid19_mobile_app): migrate theme and buttons to current API

* refactor(covid19_mobile_app): replace bezier_chart with fl_chart

* refactor(image_editor): migrate image plugins and button styles

* refactor(scan_qr_code): migrate mobile_scanner API

* refactor(lunch_app): migrate to null safety

* refactor(todo_list_using_provider): migrate to null safety

* refactor(unit_testing): migrate to null safety

* refactor(using_firebase_db): migrate Firebase Database API

* fix(update_gradle_wrapper): edit gradle-wrapper.properties directly

* refactor(push_notifications): migrate Firebase Messaging API

* refactor(using_http_get): migrate to null safety

* refactor(using_listview): migrate to null safety

* refactor(using_listwheelscrollview): migrate to null safety

* refactor(view_pdf_file): migrate to null safety

* refactor(bottom_sheet): migrate to null safety

* refactor(stateless_widgets): migrate to null safety

* chore: regenerate Gradle wrapper

* refactor: move maintenance scripts to Makefile

* chore: remove generated and IDE files

* fix: migrate image_editor to current plugins

* fix: migrate news_memes_app share to share_plus

* fix: migrate view_pdf_file to syncfusion pdf viewer

* fix: update deprecated APIs

* style: remove commented-out code
This commit is contained in:
Nishant Srivastava
2026-08-17 13:58:51 +02:00
committed by GitHub
parent 80fe9bed92
commit 8745f7cf5a
2600 changed files with 9278 additions and 58100 deletions

View File

@@ -1,61 +0,0 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
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'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.mariamelnik.flutter_date_picker"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

View File

@@ -0,0 +1,42 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
android {
namespace = "com.mariamelnik.flutter_date_picker"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
defaultConfig {
applicationId = "com.mariamelnik.flutter_date_picker"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
buildTypes {
release {
signingConfig = signingConfigs.getByName("debug")
}
}
}
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
flutter {
source = "../.."
}

View File

@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mariamelnik.flutter_date_picker">
>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.

View File

@@ -0,0 +1,19 @@
package io.flutter.plugins;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import io.flutter.Log;
import io.flutter.embedding.engine.FlutterEngine;
/**
* Generated file. Do not edit.
* This file is generated by the Flutter tool based on the
* plugins that support the Android platform.
*/
@Keep
public final class GeneratedPluginRegistrant {
private static final String TAG = "GeneratedPluginRegistrant";
public static void registerWith(@NonNull FlutterEngine flutterEngine) {
}
}

View File

@@ -1,29 +0,0 @@
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}

View File

@@ -0,0 +1,24 @@
allprojects {
repositories {
google()
mavenCentral()
}
}
val newBuildDir: Directory =
rootProject.layout.buildDirectory
.dir("../../build")
.get()
rootProject.layout.buildDirectory.value(newBuildDir)
subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}

View File

@@ -1,2 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.newDsl=false
android.builtInKotlin=false

View File

@@ -1,15 +0,0 @@
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}

View File

@@ -0,0 +1,26 @@
pluginManagement {
val flutterSdkPath =
run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "9.1.0" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
}
include(":app")

View File

@@ -0,0 +1,15 @@
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/opt/homebrew/share/flutter
FLUTTER_APPLICATION_PATH=/Users/nishantsrivastava/Personal/Workspaces/github/flutter/flutter-examples/flutter_date_pickers-master/example
FLUTTER_FRAMEWORK_SWIFT_PACKAGE_PATH=/Users/nishantsrivastava/Personal/Workspaces/github/flutter/flutter-examples/flutter_date_pickers-master/example/ios/Flutter/ephemeral/Packages/.packages/FlutterFramework
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json

View File

@@ -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 --")

View File

@@ -0,0 +1,5 @@
#
# Generated file, do not edit.
#
command script import --relative-to-command-file flutter_lldb_helper.py

View File

@@ -0,0 +1,12 @@
FLUTTER_ROOT=/opt/homebrew/share/flutter
FLUTTER_APPLICATION_PATH=/Users/nishantsrivastava/Personal/Workspaces/github/flutter/flutter-examples/flutter_date_pickers-master/example
FLUTTER_FRAMEWORK_SWIFT_PACKAGE_PATH=/Users/nishantsrivastava/Personal/Workspaces/github/flutter/flutter-examples/flutter_date_pickers-master/example/ios/Flutter/ephemeral/Packages/.packages/FlutterFramework
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json

View File

@@ -0,0 +1,19 @@
//
// Generated file. Do not edit.
//
// clang-format off
#ifndef GeneratedPluginRegistrant_h
#define GeneratedPluginRegistrant_h
#import <Flutter/Flutter.h>
NS_ASSUME_NONNULL_BEGIN
@interface GeneratedPluginRegistrant : NSObject
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
@end
NS_ASSUME_NONNULL_END
#endif /* GeneratedPluginRegistrant_h */

View File

@@ -0,0 +1,14 @@
//
// Generated file. Do not edit.
//
// clang-format off
#import "GeneratedPluginRegistrant.h"
@implementation GeneratedPluginRegistrant
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
}
@end

View File

@@ -34,10 +34,10 @@ class _DayPickerPageState extends State<DayPickerPage> {
void didChangeDependencies() {
super.didChangeDependencies();
Color? bodyTextColor = Theme.of(context).accentTextTheme.bodyText1?.color;
Color? bodyTextColor = Theme.of(context).textTheme.bodyLarge?.color;
if (bodyTextColor != null) selectedDateStyleColor = bodyTextColor;
selectedSingleDateDecorationColor = Theme.of(context).accentColor;
selectedSingleDateDecorationColor = Theme.of(context).colorScheme.secondary;
}
@override
@@ -45,8 +45,8 @@ class _DayPickerPageState extends State<DayPickerPage> {
// add selected colors to default settings
dp.DatePickerRangeStyles styles = dp.DatePickerRangeStyles(
selectedDateStyle: Theme.of(context)
.accentTextTheme
.bodyText1
.textTheme
.bodyLarge
?.copyWith(color: selectedDateStyleColor),
selectedSingleDateDecoration: BoxDecoration(
color: selectedSingleDateDecorationColor,
@@ -89,7 +89,7 @@ class _DayPickerPageState extends State<DayPickerPage> {
children: <Widget>[
Text(
"Selected date styles",
style: Theme.of(context).textTheme.subtitle1,
style: Theme.of(context).textTheme.titleMedium,
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 12.0),

View File

@@ -45,10 +45,10 @@ class _DaysPickerPageState extends State<DaysPickerPage> {
void didChangeDependencies() {
super.didChangeDependencies();
Color? bodyTextColor = Theme.of(context).accentTextTheme.bodyText1?.color;
Color? bodyTextColor = Theme.of(context).textTheme.bodyLarge?.color;
if (bodyTextColor != null) selectedDateStyleColor = bodyTextColor;
selectedSingleDateDecorationColor = Theme.of(context).accentColor;
selectedSingleDateDecorationColor = Theme.of(context).colorScheme.secondary;
}
@override
@@ -56,8 +56,8 @@ class _DaysPickerPageState extends State<DaysPickerPage> {
// add selected colors to default settings
dp.DatePickerRangeStyles styles = dp.DatePickerRangeStyles(
selectedDateStyle: Theme.of(context)
.accentTextTheme
.bodyText1
.textTheme
.bodyLarge
?.copyWith(color: selectedDateStyleColor),
selectedSingleDateDecoration: BoxDecoration(
color: selectedSingleDateDecorationColor, shape: BoxShape.circle));
@@ -92,7 +92,7 @@ class _DaysPickerPageState extends State<DaysPickerPage> {
children: <Widget>[
Text(
"Selected date styles",
style: Theme.of(context).textTheme.subtitle1,
style: Theme.of(context).textTheme.titleMedium,
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 12.0),

View File

@@ -22,10 +22,10 @@ class _MonthPickerPageState extends State<MonthPickerPage> {
void didChangeDependencies() {
super.didChangeDependencies();
Color? bodyTextColor = Theme.of(context).accentTextTheme.bodyText1?.color;
Color? bodyTextColor = Theme.of(context).textTheme.bodyLarge?.color;
if (bodyTextColor != null) selectedDateStyleColor = bodyTextColor;
selectedSingleDateDecorationColor = Theme.of(context).accentColor;
selectedSingleDateDecorationColor = Theme.of(context).colorScheme.secondary;
}
@override
@@ -33,8 +33,8 @@ class _MonthPickerPageState extends State<MonthPickerPage> {
// add selected colors to default settings
dp.DatePickerStyles styles = dp.DatePickerStyles(
selectedDateStyle: Theme.of(context)
.accentTextTheme
.bodyText1
.textTheme
.bodyLarge
?.copyWith(color: selectedDateStyleColor),
selectedSingleDateDecoration: BoxDecoration(
color: selectedSingleDateDecorationColor, shape: BoxShape.circle));
@@ -62,7 +62,7 @@ class _MonthPickerPageState extends State<MonthPickerPage> {
children: <Widget>[
Text(
"Selected date styles",
style: Theme.of(context).textTheme.subtitle1,
style: Theme.of(context).textTheme.titleMedium,
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 12.0),

View File

@@ -37,9 +37,9 @@ class _RangePickerPageState extends State<RangePickerPage> {
void didChangeDependencies() {
super.didChangeDependencies();
selectedPeriodLastColor = Theme.of(context).accentColor;
selectedPeriodMiddleColor = Theme.of(context).accentColor;
selectedPeriodStartColor = Theme.of(context).accentColor;
selectedPeriodLastColor = Theme.of(context).colorScheme.secondary;
selectedPeriodMiddleColor = Theme.of(context).colorScheme.secondary;
selectedPeriodStartColor = Theme.of(context).colorScheme.secondary;
}
@override
@@ -92,7 +92,7 @@ class _RangePickerPageState extends State<RangePickerPage> {
children: <Widget>[
Text(
"Selected date styles",
style: Theme.of(context).textTheme.subtitle1,
style: Theme.of(context).textTheme.titleMedium,
),
_stylesBlock(),
_selectedBlock()

View File

@@ -46,9 +46,9 @@ class _RangePickerPageStyledState extends State<RangePickerPageStyled> {
super.didChangeDependencies();
// defaults for styles
selectedPeriodLastColor = Theme.of(context).accentColor;
selectedPeriodMiddleColor = Theme.of(context).accentColor;
selectedPeriodStartColor = Theme.of(context).accentColor;
selectedPeriodLastColor = Theme.of(context).colorScheme.secondary;
selectedPeriodMiddleColor = Theme.of(context).colorScheme.secondary;
selectedPeriodStartColor = Theme.of(context).colorScheme.secondary;
}
@override
@@ -120,7 +120,7 @@ class _RangePickerPageStyledState extends State<RangePickerPageStyled> {
children: <Widget>[
Text(
"Selected date styles",
style: Theme.of(context).textTheme.subtitle1,
style: Theme.of(context).textTheme.titleMedium,
),
_selectedBlock()
],

View File

@@ -35,9 +35,9 @@ class _WeekPickerPageState extends State<WeekPickerPage> {
super.didChangeDependencies();
// defaults for styles
selectedPeriodLastColor = Theme.of(context).accentColor;
selectedPeriodMiddleColor = Theme.of(context).accentColor;
selectedPeriodStartColor = Theme.of(context).accentColor;
selectedPeriodLastColor = Theme.of(context).colorScheme.secondary;
selectedPeriodMiddleColor = Theme.of(context).colorScheme.secondary;
selectedPeriodStartColor = Theme.of(context).colorScheme.secondary;
}
@override
@@ -84,7 +84,7 @@ class _WeekPickerPageState extends State<WeekPickerPage> {
children: <Widget>[
Text(
"Selected date styles",
style: Theme.of(context).textTheme.subtitle1,
style: Theme.of(context).textTheme.titleMedium,
),
_stylesBlock(),
_selectedBlock()
@@ -229,7 +229,7 @@ class _WeekPickerPageState extends State<WeekPickerPage> {
TextStyle? whiteText = Theme.of(context)
.textTheme
.bodyText2
.bodyMedium
?.copyWith(color: Colors.white);
return isEventDate

View File

@@ -81,7 +81,7 @@ class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin {
data: Theme.of(context).copyWith(
canvasColor: Colors.blueGrey,
textTheme: Theme.of(context).textTheme.copyWith(
caption: TextStyle(color: Colors.white.withOpacity(0.5)))),
bodySmall: TextStyle(color: Colors.white.withOpacity(0.5)))),
child: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
items: [

View File

@@ -5,58 +5,66 @@ packages:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37
url: "https://pub.dev"
source: hosted
version: "2.5.0"
version: "2.13.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
sha256: "5bbf32bc9e518d41ec49718e2931cd4527292c9b0c6d2dffcf7fe6b9a8a8cf72"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.4.1"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
sha256: "8e36feea6de5ea69f2199f29cf42a450a855738c498b57c0b980e2d3cca9c362"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
version: "1.15.0"
version: "1.19.1"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
sha256: caac504f942f41dfadcf45229ce8c47065b93919a12739f20d6173a883c5ec73
url: "https://pub.dev"
source: hosted
version: "1.0.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.3"
flutter:
dependency: "direct main"
description: flutter
@@ -68,7 +76,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.2.3+1"
version: "0.2.4"
flutter_localizations:
dependency: "direct main"
description: flutter
@@ -77,12 +85,11 @@ packages:
flutter_material_color_picker:
dependency: "direct main"
description:
path: "."
ref: HEAD
resolved-ref: "286596b1e0167877bcdb87011bff77364338ba57"
url: "git://github.com/Bwolfs2/flutter_material_color_picker.git"
source: git
version: "1.0.5-nullsafety.0"
name: flutter_material_color_picker
sha256: ca1e7749d228c9155ea24bce98e647cdbffa350e6f334f6c001f841cd3d9c987
url: "https://pub.dev"
source: hosted
version: "1.2.0"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -92,90 +99,135 @@ packages:
dependency: transitive
description:
name: intl
url: "https://pub.dartlang.org"
sha256: "1ca20c894b1717686a2319b8548763d812bc0aabdac580420a44c5178c57a867"
url: "https://pub.dev"
source: hosted
version: "0.17.0"
version: "0.20.3"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
source: hosted
version: "11.0.2"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
url: "https://pub.dev"
source: hosted
version: "0.12.10"
version: "0.12.20"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
url: "https://pub.dev"
source: hosted
version: "0.13.0"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.19.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.9.1"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
sha256: f4b22294de9a549967d0033d4f30fcad4f0afc200f4bf58e82d815725feec70c
url: "https://pub.dev"
source: hosted
version: "1.8.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.12.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.4"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
sha256: dd11571b8a03f7cadcf91ec26a77e02bfbd6bbba2a512924d3116646b4198fc4
url: "https://pub.dev"
source: hosted
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
sha256: a88162591b02c1f3a3db3af8ce1ea2b374bd75a7bb8d5e353bcfbdc79d719830
url: "https://pub.dev"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
url: "https://pub.dev"
source: hosted
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "0.7.12"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
sha256: f36f9f3be64c6198714492bb455c11056e33e2f85d9a0b676a48301e44fdcf47
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.4.2"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360"
url: "https://pub.dev"
source: hosted
version: "15.2.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=3.11.0-0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"

View File

@@ -21,10 +21,7 @@ dependencies:
sdk: flutter
flutter_localizations:
sdk: flutter
flutter_material_color_picker:
# null-safety fork
git:
url: git://github.com/Bwolfs2/flutter_material_color_picker.git
flutter_material_color_picker: ^1.1.0
flutter_date_pickers:
path: ../