mirror of
https://github.com/Iconica-Development/flutter_dialogs.git
synced 2025-05-18 19:03:43 +02:00
fix: add CI and linter
This commit is contained in:
parent
d9f7b51336
commit
fcd23e78b6
10 changed files with 269 additions and 252 deletions
14
.github/workflows/component-ci.yml
vendored
Normal file
14
.github/workflows/component-ci.yml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
name: Iconica Standard Component CI Workflow
|
||||||
|
# Workflow Caller version: 2.0.0
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-global-iconica-workflow:
|
||||||
|
uses: Iconica-Development/.github/.github/workflows/component-ci.yml@master
|
||||||
|
secrets: inherit
|
||||||
|
permissions: write-all
|
||||||
|
with:
|
||||||
|
subfolder: "." # add optional subfolder to run workflow in
|
|
@ -1,3 +1,7 @@
|
||||||
|
## 0.0.2
|
||||||
|
|
||||||
|
- Added CI and linter
|
||||||
|
|
||||||
## 0.0.1
|
## 0.0.1
|
||||||
|
|
||||||
- Initial port
|
- Initial port
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
include: package:flutter_lints/flutter.yaml
|
include: package:flutter_iconica_analysis/analysis_options.yaml
|
||||||
|
|
||||||
# Additional information about this file can be found at
|
# Possible to overwrite the rules from the package
|
||||||
# https://dart.dev/guides/language/analysis-options
|
|
||||||
|
analyzer:
|
||||||
|
exclude:
|
||||||
|
|
||||||
|
linter:
|
||||||
|
rules:
|
|
@ -1,10 +1,10 @@
|
||||||
// SPDX-FileCopyrightText: 2022 Iconica
|
// SPDX-FileCopyrightText: 2022 Iconica
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: BSD-3-Clause
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
///
|
||||||
library flutter_dialogs;
|
library flutter_dialogs;
|
||||||
|
|
||||||
export './src/dialogs.dart';
|
|
||||||
export './src/popup_service.dart';
|
|
||||||
export './src/popup_parent.dart';
|
|
||||||
export './src/alert_dialogs.dart';
|
export './src/alert_dialogs.dart';
|
||||||
|
export './src/dialogs.dart';
|
||||||
|
export './src/popup_parent.dart';
|
||||||
|
export './src/popup_service.dart';
|
||||||
|
|
|
@ -5,20 +5,19 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class AlertDialogAction {
|
class AlertDialogAction {
|
||||||
final String text;
|
|
||||||
final bool primary;
|
|
||||||
final bool secondary;
|
|
||||||
final VoidCallback onPressed;
|
|
||||||
|
|
||||||
AlertDialogAction({
|
AlertDialogAction({
|
||||||
required this.text,
|
required this.text,
|
||||||
|
required this.onPressed,
|
||||||
this.primary = false,
|
this.primary = false,
|
||||||
this.secondary = false,
|
this.secondary = false,
|
||||||
required this.onPressed,
|
|
||||||
}) : assert(
|
}) : assert(
|
||||||
!(primary && secondary),
|
!(primary && secondary),
|
||||||
"AlertDialogAction can't be primary and secondary at the same time",
|
"AlertDialogAction can't be primary and secondary at the same time",
|
||||||
);
|
);
|
||||||
|
final String text;
|
||||||
|
final bool primary;
|
||||||
|
final bool secondary;
|
||||||
|
final VoidCallback onPressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef ButtonCallback = Widget Function(
|
typedef ButtonCallback = Widget Function(
|
||||||
|
@ -33,13 +32,6 @@ typedef IconButtonCallback = Widget Function(
|
||||||
);
|
);
|
||||||
|
|
||||||
class IconicaAlertDialog extends StatelessWidget {
|
class IconicaAlertDialog extends StatelessWidget {
|
||||||
final List<AlertDialogAction> buttons;
|
|
||||||
final WidgetBuilder body;
|
|
||||||
final bool? closeButton;
|
|
||||||
final ButtonCallback? primaryButton;
|
|
||||||
final ButtonCallback? secondaryButton;
|
|
||||||
final IconButtonCallback? iconButton;
|
|
||||||
|
|
||||||
const IconicaAlertDialog._({
|
const IconicaAlertDialog._({
|
||||||
required this.buttons,
|
required this.buttons,
|
||||||
required this.body,
|
required this.body,
|
||||||
|
@ -59,8 +51,8 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
ButtonCallback? primaryButton,
|
ButtonCallback? primaryButton,
|
||||||
ButtonCallback? secondaryButton,
|
ButtonCallback? secondaryButton,
|
||||||
IconButtonCallback? iconButton,
|
IconButtonCallback? iconButton,
|
||||||
}) {
|
}) =>
|
||||||
return IconicaAlertDialog.multiButton(
|
IconicaAlertDialog.multiButton(
|
||||||
primaryButton: primaryButton,
|
primaryButton: primaryButton,
|
||||||
secondaryButton: secondaryButton,
|
secondaryButton: secondaryButton,
|
||||||
iconButton: iconButton,
|
iconButton: iconButton,
|
||||||
|
@ -75,7 +67,6 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
factory IconicaAlertDialog.multiButton({
|
factory IconicaAlertDialog.multiButton({
|
||||||
required String title,
|
required String title,
|
||||||
|
@ -85,8 +76,8 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
ButtonCallback? primaryButton,
|
ButtonCallback? primaryButton,
|
||||||
ButtonCallback? secondaryButton,
|
ButtonCallback? secondaryButton,
|
||||||
IconButtonCallback? iconButton,
|
IconButtonCallback? iconButton,
|
||||||
}) {
|
}) =>
|
||||||
return IconicaAlertDialog._(
|
IconicaAlertDialog._(
|
||||||
primaryButton: primaryButton,
|
primaryButton: primaryButton,
|
||||||
secondaryButton: secondaryButton,
|
secondaryButton: secondaryButton,
|
||||||
iconButton: iconButton,
|
iconButton: iconButton,
|
||||||
|
@ -100,9 +91,9 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
title,
|
title,
|
||||||
style: Theme.of(context).textTheme.headline6?.copyWith(
|
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: Theme.of(context).textTheme.bodyText2?.color,
|
color: Theme.of(context).textTheme.bodyMedium?.color,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
|
@ -111,14 +102,13 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
padding: const EdgeInsets.only(top: 20, left: 20, right: 20),
|
padding: const EdgeInsets.only(top: 20, left: 20, right: 20),
|
||||||
child: Text(
|
child: Text(
|
||||||
body,
|
body,
|
||||||
style: Theme.of(context).textTheme.bodyText2,
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
factory IconicaAlertDialog.icon({
|
factory IconicaAlertDialog.icon({
|
||||||
required String title,
|
required String title,
|
||||||
|
@ -129,8 +119,8 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
ButtonCallback? primaryButton,
|
ButtonCallback? primaryButton,
|
||||||
ButtonCallback? secondaryButton,
|
ButtonCallback? secondaryButton,
|
||||||
IconButtonCallback? iconButton,
|
IconButtonCallback? iconButton,
|
||||||
}) {
|
}) =>
|
||||||
return IconicaAlertDialog._(
|
IconicaAlertDialog._(
|
||||||
primaryButton: primaryButton,
|
primaryButton: primaryButton,
|
||||||
secondaryButton: secondaryButton,
|
secondaryButton: secondaryButton,
|
||||||
iconButton: iconButton,
|
iconButton: iconButton,
|
||||||
|
@ -143,7 +133,7 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||||
child: Text(
|
child: Text(
|
||||||
title,
|
title,
|
||||||
style: Theme.of(context).textTheme.headline6?.copyWith(
|
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
@ -153,14 +143,13 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
padding: const EdgeInsets.only(top: 20, left: 20, right: 20),
|
padding: const EdgeInsets.only(top: 20, left: 20, right: 20),
|
||||||
child: Text(
|
child: Text(
|
||||||
body,
|
body,
|
||||||
style: Theme.of(context).textTheme.bodyText2,
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
factory IconicaAlertDialog.yesOrNo({
|
factory IconicaAlertDialog.yesOrNo({
|
||||||
required String title,
|
required String title,
|
||||||
|
@ -173,8 +162,8 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
ButtonCallback? primaryButton,
|
ButtonCallback? primaryButton,
|
||||||
ButtonCallback? secondaryButton,
|
ButtonCallback? secondaryButton,
|
||||||
IconButtonCallback? iconButton,
|
IconButtonCallback? iconButton,
|
||||||
}) {
|
}) =>
|
||||||
return IconicaAlertDialog.multiButton(
|
IconicaAlertDialog.multiButton(
|
||||||
primaryButton: primaryButton,
|
primaryButton: primaryButton,
|
||||||
secondaryButton: secondaryButton,
|
secondaryButton: secondaryButton,
|
||||||
iconButton: iconButton,
|
iconButton: iconButton,
|
||||||
|
@ -183,7 +172,6 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
body: body,
|
body: body,
|
||||||
buttons: _getYesNoDialogButtons(focusYes, otherSecondary, onYes, onNo),
|
buttons: _getYesNoDialogButtons(focusYes, otherSecondary, onYes, onNo),
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
factory IconicaAlertDialog.yesOrNoIcon({
|
factory IconicaAlertDialog.yesOrNoIcon({
|
||||||
required String title,
|
required String title,
|
||||||
|
@ -197,8 +185,8 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
ButtonCallback? primaryButton,
|
ButtonCallback? primaryButton,
|
||||||
ButtonCallback? secondaryButton,
|
ButtonCallback? secondaryButton,
|
||||||
IconButtonCallback? iconButton,
|
IconButtonCallback? iconButton,
|
||||||
}) {
|
}) =>
|
||||||
return IconicaAlertDialog.icon(
|
IconicaAlertDialog.icon(
|
||||||
primaryButton: primaryButton,
|
primaryButton: primaryButton,
|
||||||
secondaryButton: secondaryButton,
|
secondaryButton: secondaryButton,
|
||||||
iconButton: iconButton,
|
iconButton: iconButton,
|
||||||
|
@ -208,7 +196,6 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
icon: icon,
|
icon: icon,
|
||||||
buttons: _getYesNoDialogButtons(focusYes, otherSecondary, onYes, onNo),
|
buttons: _getYesNoDialogButtons(focusYes, otherSecondary, onYes, onNo),
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
factory IconicaAlertDialog.singleButtonIcon({
|
factory IconicaAlertDialog.singleButtonIcon({
|
||||||
required String title,
|
required String title,
|
||||||
|
@ -222,8 +209,8 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
ButtonCallback? primaryButton,
|
ButtonCallback? primaryButton,
|
||||||
ButtonCallback? secondaryButton,
|
ButtonCallback? secondaryButton,
|
||||||
IconButtonCallback? iconButton,
|
IconButtonCallback? iconButton,
|
||||||
}) {
|
}) =>
|
||||||
return IconicaAlertDialog.icon(
|
IconicaAlertDialog.icon(
|
||||||
primaryButton: primaryButton,
|
primaryButton: primaryButton,
|
||||||
secondaryButton: secondaryButton,
|
secondaryButton: secondaryButton,
|
||||||
iconButton: iconButton,
|
iconButton: iconButton,
|
||||||
|
@ -240,7 +227,6 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
factory IconicaAlertDialog.custom({
|
factory IconicaAlertDialog.custom({
|
||||||
required Widget body,
|
required Widget body,
|
||||||
|
@ -249,8 +235,8 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
ButtonCallback? primaryButton,
|
ButtonCallback? primaryButton,
|
||||||
ButtonCallback? secondaryButton,
|
ButtonCallback? secondaryButton,
|
||||||
IconButtonCallback? iconButton,
|
IconButtonCallback? iconButton,
|
||||||
}) {
|
}) =>
|
||||||
return IconicaAlertDialog._(
|
IconicaAlertDialog._(
|
||||||
closeButton: closeButton,
|
closeButton: closeButton,
|
||||||
buttons: buttons,
|
buttons: buttons,
|
||||||
body: (_) => body,
|
body: (_) => body,
|
||||||
|
@ -258,7 +244,12 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
secondaryButton: secondaryButton,
|
secondaryButton: secondaryButton,
|
||||||
iconButton: iconButton,
|
iconButton: iconButton,
|
||||||
);
|
);
|
||||||
}
|
final List<AlertDialogAction> buttons;
|
||||||
|
final WidgetBuilder body;
|
||||||
|
final bool? closeButton;
|
||||||
|
final ButtonCallback? primaryButton;
|
||||||
|
final ButtonCallback? secondaryButton;
|
||||||
|
final IconButtonCallback? iconButton;
|
||||||
|
|
||||||
static List<AlertDialogAction> _getYesNoDialogButtons(
|
static List<AlertDialogAction> _getYesNoDialogButtons(
|
||||||
bool focusYes,
|
bool focusYes,
|
||||||
|
@ -267,8 +258,8 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
VoidCallback onNo, {
|
VoidCallback onNo, {
|
||||||
String no = 'No',
|
String no = 'No',
|
||||||
String yes = 'Yes',
|
String yes = 'Yes',
|
||||||
}) {
|
}) =>
|
||||||
return <AlertDialogAction>[
|
<AlertDialogAction>[
|
||||||
if (focusYes) ...[
|
if (focusYes) ...[
|
||||||
AlertDialogAction(
|
AlertDialogAction(
|
||||||
text: no,
|
text: no,
|
||||||
|
@ -292,11 +283,9 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) => Column(
|
||||||
return Column(
|
|
||||||
children: [
|
children: [
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
|
@ -325,7 +314,8 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
top: buttons.isNotEmpty ? 40 : 0,
|
top: buttons.isNotEmpty ? 40 : 0,
|
||||||
bottom: 20,
|
bottom: 20,
|
||||||
left: 20,
|
left: 20,
|
||||||
right: 20),
|
right: 20,
|
||||||
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: buttons.map(
|
children: buttons.map(
|
||||||
|
@ -377,9 +367,9 @@ class IconicaAlertDialog extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
)),
|
),
|
||||||
)
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import 'package:flutter/material.dart' as m;
|
||||||
|
|
||||||
class DialogService {
|
class DialogService {
|
||||||
static DialogService? _instance;
|
static DialogService? _instance;
|
||||||
static DialogService get instance => _instance ??= DialogService();
|
static final DialogService instance = _instance ??= DialogService();
|
||||||
|
|
||||||
Future<T?> showDialog<T>({
|
Future<T?> showDialog<T>({
|
||||||
required m.BuildContext context,
|
required m.BuildContext context,
|
||||||
|
@ -17,16 +17,14 @@ class DialogService {
|
||||||
bool useSafeArea = false,
|
bool useSafeArea = false,
|
||||||
bool useRootNavigator = true,
|
bool useRootNavigator = true,
|
||||||
m.RouteSettings? routeSettings,
|
m.RouteSettings? routeSettings,
|
||||||
}) {
|
}) =>
|
||||||
return m.showDialog(
|
m.showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: barrierDismissible,
|
barrierDismissible: barrierDismissible,
|
||||||
barrierColor: barrierColor,
|
barrierColor: barrierColor,
|
||||||
barrierLabel: barrierLabel,
|
barrierLabel: barrierLabel,
|
||||||
useSafeArea: useSafeArea,
|
useSafeArea: useSafeArea,
|
||||||
useRootNavigator: useRootNavigator,
|
useRootNavigator: useRootNavigator,
|
||||||
builder: (ctx) {
|
builder: (ctx) => m.Builder(builder: builder),
|
||||||
return m.Builder(builder: builder);
|
);
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,16 +9,17 @@ class PopUp extends StatelessWidget {
|
||||||
const PopUp({
|
const PopUp({
|
||||||
required this.popUpData,
|
required this.popUpData,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
Key? key,
|
super.key,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final void Function()? onTap;
|
final void Function()? onTap;
|
||||||
final PopUpData popUpData;
|
final PopUpData popUpData;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var style = Theme.of(context).textTheme.bodyText1?.copyWith(
|
var style = Theme.of(context).textTheme.bodyLarge?.copyWith(
|
||||||
color: popUpData.textColor ?? Theme.of(context).backgroundColor,
|
color:
|
||||||
|
popUpData.textColor ?? Theme.of(context).colorScheme.background,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
height: 1.571,
|
height: 1.571,
|
||||||
|
|
|
@ -10,7 +10,7 @@ import 'package:flutter_dialogs/src/popup_data.dart';
|
||||||
import 'package:flutter_dialogs/src/popup_service.dart';
|
import 'package:flutter_dialogs/src/popup_service.dart';
|
||||||
|
|
||||||
class PopUpParent extends StatefulWidget {
|
class PopUpParent extends StatefulWidget {
|
||||||
const PopUpParent({required this.child, Key? key}) : super(key: key);
|
const PopUpParent({required this.child, super.key});
|
||||||
|
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class PopUpParentState extends State<PopUpParent> {
|
||||||
final Queue<PopUpData> _popUpQueue = Queue();
|
final Queue<PopUpData> _popUpQueue = Queue();
|
||||||
|
|
||||||
void displayPopUp(PopUpData popUp) {
|
void displayPopUp(PopUpData popUp) {
|
||||||
if (_showPopUp == true) {
|
if (_showPopUp) {
|
||||||
_popUpQueue.add(popUp);
|
_popUpQueue.add(popUp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -62,8 +62,7 @@ class PopUpParentState extends State<PopUpParent> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) => Stack(
|
||||||
return Stack(
|
|
||||||
children: [
|
children: [
|
||||||
widget.child,
|
widget.child,
|
||||||
Container(
|
Container(
|
||||||
|
@ -91,4 +90,3 @@ class PopUpParentState extends State<PopUpParent> {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import 'package:flutter_dialogs/src/popup_parent.dart';
|
||||||
|
|
||||||
class PopUpService {
|
class PopUpService {
|
||||||
static PopUpService? _instance;
|
static PopUpService? _instance;
|
||||||
static PopUpService get instance => _instance ??= PopUpService();
|
static final PopUpService instance = _instance ??= PopUpService();
|
||||||
|
|
||||||
late PopUpParentState currentState;
|
late PopUpParentState currentState;
|
||||||
|
|
||||||
|
@ -19,22 +19,26 @@ class PopUpService {
|
||||||
Color? backgroundColor,
|
Color? backgroundColor,
|
||||||
Color? textColor,
|
Color? textColor,
|
||||||
}) {
|
}) {
|
||||||
currentState.displayPopUp(PopUpData(
|
currentState.displayPopUp(
|
||||||
|
PopUpData(
|
||||||
duration,
|
duration,
|
||||||
text: text,
|
text: text,
|
||||||
icon: icon,
|
icon: icon,
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
textColor: textColor,
|
textColor: textColor,
|
||||||
));
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showCustom(
|
void showCustom(
|
||||||
Widget custom, {
|
Widget custom, {
|
||||||
Duration duration = const Duration(seconds: 3),
|
Duration duration = const Duration(seconds: 3),
|
||||||
}) {
|
}) {
|
||||||
currentState.displayPopUp(PopUpData(
|
currentState.displayPopUp(
|
||||||
|
PopUpData(
|
||||||
duration,
|
duration,
|
||||||
custom: custom,
|
custom: custom,
|
||||||
));
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
name: flutter_dialogs
|
name: flutter_dialogs
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 0.0.1
|
version: 0.0.2
|
||||||
homepage: https://github.com/Iconica-Development/flutter_dialogs
|
homepage: https://github.com/Iconica-Development/flutter_dialogs
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.18.2 <3.0.0'
|
sdk: ">=2.18.2 <3.0.0"
|
||||||
flutter: ">=1.17.0"
|
flutter: ">=1.17.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -14,6 +14,9 @@ dependencies:
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_lints: ^2.0.0
|
flutter_iconica_analysis:
|
||||||
|
git:
|
||||||
|
url: https://github.com/Iconica-Development/flutter_iconica_analysis
|
||||||
|
ref: 6.0.0
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
|
|
Loading…
Reference in a new issue