Skip to content

Commit

Permalink
feat: bring up to date (#391)
Browse files Browse the repository at this point in the history
* fix: lints

* feat: fix inner not resizing

* fix: expanded
  • Loading branch information
jamesblasco authored Mar 12, 2024
1 parent e06e8e9 commit 2e4826d
Show file tree
Hide file tree
Showing 62 changed files with 595 additions and 357 deletions.
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
4 changes: 2 additions & 2 deletions modal_bottom_sheet/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
url_launcher_ios: ae1517e5e344f5544fb090b079e11f399dfbe4d2
url_launcher_ios: 68d46cc9766d0c41dbdc884310529557e3cd7a86

PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3

COCOAPODS: 1.13.0
COCOAPODS: 1.14.3
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
4 changes: 2 additions & 2 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
5 changes: 2 additions & 3 deletions modal_bottom_sheet/example/lib/modals/circular_modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ class AvatarBottomSheet extends StatelessWidget {
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';

class NestedScrollModal extends StatelessWidget {
const NestedScrollModal({Key? key}) : super(key: key);
const NestedScrollModal({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/material.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';

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

@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 ModalWithScroll extends StatelessWidget {
const ModalWithScroll({Key? key}) : super(key: key);
const ModalWithScroll({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion modal_bottom_sheet/example/lib/web_frame.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:url_launcher/url_launcher_string.dart';
class WebFrame extends StatelessWidget {
final Widget child;

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

@override
Widget build(BuildContext context) {
Expand Down
34 changes: 21 additions & 13 deletions modal_bottom_sheet/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.18.0"
cupertino_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -72,6 +72,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
lints:
dependency: "direct dev"
description:
name: lints
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
url: "https://pub.dev"
source: hosted
version: "3.0.0"
matcher:
dependency: transitive
description:
Expand All @@ -92,10 +100,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
modal_bottom_sheet:
dependency: "direct main"
description:
Expand Down Expand Up @@ -136,18 +144,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
Expand All @@ -168,10 +176,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.6.1"
url_launcher:
dependency: "direct main"
description:
Expand Down Expand Up @@ -248,10 +256,10 @@ packages:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
version: "0.3.0"
sdks:
dart: ">=3.1.0 <4.0.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.13.0"
59 changes: 5 additions & 54 deletions modal_bottom_sheet/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,75 +1,26 @@
name: example
description: A new Flutter project.
publish_to: none
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
sdk: '>=2.17.0 <3.0.0'
flutter: ">=3.7.0"

sdk: ">=3.0.0 <4.0.0"

dependencies:
cupertino_icons: ^1.0.5
cupertino_icons: ^1.0.6
flutter:
sdk: flutter
modal_bottom_sheet:
path: '../'
url_launcher: ^6.1.5
url_launcher: ^6.2.1

dev_dependencies:
flutter_test:
sdk: flutter
lints: ^3.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true

assets:
- assets/
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.

# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages

# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
- assets/
Loading

0 comments on commit 2e4826d

Please sign in to comment.