Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from jamesblasco:main #1

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions modal_bottom_sheet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 3.0.0 - Flutter 3.19

+ Migrates to Flutter 3.19
+ ModalBottomSheetRoute has been renamed to ModalSheetRoute
- WillPopScope support will be replaced for PopScope functionality


## 3.0.0-pre - Flutter 3.7

+ Migrates to Flutter 3.7
+ ModalBottomSheetRoute has been renamed to ModalSheetRoute so it does not conflict with the new class from Flutter 3.7

## 2.1.1
+ Bug fixes
Expand Down
5 changes: 1 addition & 4 deletions modal_bottom_sheet/example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@


enable-experiment:
- extension-methods
include: package:lints/recommended.yaml
6 changes: 3 additions & 3 deletions modal_bottom_sheet/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31
compileSdkVersion 33

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -35,8 +35,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.example"
minSdkVersion 16
targetSdkVersion 31
minSdkVersion flutter.minSdkVersion
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
4 changes: 2 additions & 2 deletions modal_bottom_sheet/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.10'
repositories {
google()
jcenter()
Expand All @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
10 changes: 7 additions & 3 deletions modal_bottom_sheet/example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx1536M \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens=java.base/java.lang=ALL-UNNAMED \
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens=java.base/java.io=ALL-UNNAMED \
--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
android.useAndroidX=true
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
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>9.0</string>
<string>11.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion modal_bottom_sheet/example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
8 changes: 4 additions & 4 deletions modal_bottom_sheet/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
url_launcher_ios: 68d46cc9766d0c41dbdc884310529557e3cd7a86

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3

COCOAPODS: 1.11.3
COCOAPODS: 1.14.3
17 changes: 11 additions & 6 deletions modal_bottom_sheet/example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -113,7 +113,6 @@
9E13656F8C2A211F9F4C04EF /* Pods-Runner.release.xcconfig */,
C33049C8773181A0B4BCD4EE /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -156,7 +155,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -200,10 +199,12 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand All @@ -214,6 +215,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -340,7 +342,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand All @@ -356,6 +358,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 87RQQPQ85J;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -417,7 +420,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -466,7 +469,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand All @@ -483,6 +486,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 87RQQPQ85J;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -505,6 +509,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 87RQQPQ85J;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions modal_bottom_sheet/example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
6 changes: 3 additions & 3 deletions modal_bottom_sheet/example/lib/examples/cupertino_share.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class CupertinoSharePage extends StatelessWidget {
}

class PhotoShareBottomSheet extends StatelessWidget {
const PhotoShareBottomSheet({Key? key}) : super(key: key);
const PhotoShareBottomSheet({super.key});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -539,9 +539,9 @@ final actions2 = [
];

extension ListUtils<T> on List<T> {
List<T> addItemInBetween<A extends T>(A item) => this.length == 0
List<T> addItemInBetween<A extends T>(A item) => isEmpty
? this
: (this.fold([], (r, element) => [...r, element, item])..removeLast());
: (fold([], (r, element) => [...r, element, item])..removeLast());
}

class SimpleSliverDelegate extends SliverPersistentHeaderDelegate {
Expand Down
6 changes: 3 additions & 3 deletions modal_bottom_sheet/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ class MyApp extends StatelessWidget {
}

class MyHomePage extends StatefulWidget {
MyHomePage({Key? key, required this.title}) : super(key: key);
MyHomePage({super.key, required this.title});

final String title;

@override
_MyHomePageState createState() => _MyHomePageState();
State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
Expand Down Expand Up @@ -260,7 +260,7 @@ class _MyHomePageState extends State<MyHomePage> {
padding: EdgeInsets.fromLTRB(16, 20, 16, 8),
child: Text(
title,
style: Theme.of(context).textTheme.caption,
style: Theme.of(context).textTheme.bodySmall,
),
);
}
Expand Down
10 changes: 5 additions & 5 deletions modal_bottom_sheet/example/lib/modals/circular_modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import 'dart:math';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'
as modal_bottom_sheet;

class AvatarBottomSheet extends StatelessWidget {
final Widget child;
final Animation<double> animation;
final SystemUiOverlayStyle? overlayStyle;

const AvatarBottomSheet(
{Key? key,
{super.key,
required this.child,
required this.animation,
this.overlayStyle})
: super(key: key);
this.overlayStyle});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -98,7 +98,7 @@ Future<T?> showAvatarModalBottomSheet<T>({
assert(debugCheckHasMediaQuery(context));
assert(debugCheckHasMaterialLocalizations(context));
final result = await Navigator.of(context, rootNavigator: useRootNavigator)
.push(ModalBottomSheetRoute<T>(
.push(modal_bottom_sheet.ModalSheetRoute<T>(
builder: builder,
containerBuilder: (_, animation, child) => AvatarBottomSheet(
child: child,
Expand Down
3 changes: 1 addition & 2 deletions modal_bottom_sheet/example/lib/modals/floating_modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ class FloatingModal extends StatelessWidget {
final Widget child;
final Color? backgroundColor;

const FloatingModal({Key? key, required this.child, this.backgroundColor})
: super(key: key);
const FloatingModal({super.key, required this.child, this.backgroundColor});

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';

class ComplexModal extends StatelessWidget {
const ComplexModal({Key? key}) : super(key: key);
const ComplexModal({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion modal_bottom_sheet/example/lib/modals/modal_fit.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

class ModalFit extends StatelessWidget {
const ModalFit({Key? key}) : super(key: key);
const ModalFit({super.key});

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
class ModalInsideModal extends StatelessWidget {
final bool reverse;

const ModalInsideModal({Key? key, this.reverse = false}) : super(key: key);
const ModalInsideModal({super.key, this.reverse = false});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion modal_bottom_sheet/example/lib/modals/modal_simple.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class SimpleModal extends StatelessWidget {
const SimpleModal({Key? key}) : super(key: key);
const SimpleModal({super.key});

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class ModalWillScope extends StatelessWidget {
const ModalWillScope({Key? key}) : super(key: key);
const ModalWillScope({super.key});

@override
Widget build(BuildContext context) {
Expand Down
16 changes: 8 additions & 8 deletions modal_bottom_sheet/example/lib/modals/modal_with_navigator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@ import 'package:flutter/material.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';

class ModalWithNavigator extends StatelessWidget {
const ModalWithNavigator({Key? key}) : super(key: key);
const ModalWithNavigator({super.key});

@override
Widget build(BuildContext rootContext) {
Widget build(BuildContext context) {
return Material(
child: Navigator(
onGenerateRoute: (_) => MaterialPageRoute(
builder: (context2) => Builder(
builder: (context) => CupertinoPageScaffold(
builder: (childContext) => Builder(
builder: (childContext2) => CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
leading: Container(), middle: Text('Modal Page')),
child: SafeArea(
bottom: false,
child: ListView(
shrinkWrap: true,
controller: ModalScrollController.of(context),
controller: ModalScrollController.of(childContext2),
children: ListTile.divideTiles(
context: context,
context: childContext2,
tiles: List.generate(
100,
(index) => ListTile(
title: Text('Item'),
onTap: () {
Navigator.of(context).push(
Navigator.of(childContext2).push(
MaterialPageRoute(
builder: (context) => CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
Expand All @@ -37,7 +37,7 @@ class ModalWithNavigator extends StatelessWidget {
children: <Widget>[
MaterialButton(
onPressed: () =>
Navigator.of(rootContext).pop(),
Navigator.of(context).pop(),
child: Text('touch here'),
)
],
Expand Down
Loading