# adaptive_dialog **Repository Path**: lc_os/adaptive_dialog ## Basic Information - **Project Name**: adaptive_dialog - **Description**: adaptive_dialog-1.2.0 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-18 - **Last Updated**: 2023-12-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # adaptive_dialog Show alert dialog or modal action sheet adaptively according to platform. --- ## [showOkAlertDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showOkAlertDialog.html) Convenient wrapper of [showAlertDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showAlertDialog.html). iOS | Android --- | --- n1 | n2 ## [showOkCancelAlertDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showOkCancelAlertDialog.html) Convenient wrapper of [showAlertDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showAlertDialog.html). iOS | Android --- | --- n3 | n4 n5 | n6 ## [showConfirmationDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showConfirmationDialog.html) Show [Confirmation Dialog](https://material.io/components/dialogs#confirmation-dialog). For Cupertino, fallback to ActionSheet. iOS | Android --- | --- n3 | n5 ## [showModalActionSheet](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showModalActionSheet.html) iOS | Android --- | --- n7 | n8 n9 | n10 n11 | n12 ## [showTextInputDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showTextInputDialog.html) iOS | Android --- | --- n1 | n2 n3 | n4 ## [showTextAnswerDialog](https://pub.dev/documentation/adaptive_dialog/latest/adaptive_dialog/showTextAnswerDialog.html) Show text input dialog until answer is correct or cancelled. This is useful for preventing very destructive action is executed mistakenly. iOS | Android --- | --- n5 | n6 --- # FAQ ## The getter `modalBarrierDismissLabel` was called on null `adaptive_dialog` uses Cupertino-style widgets internally on iOS, so `GlobalCupertinoLocalizations.delegate` is required under certain conditions. ```dart import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; class App extends StatelessWidget { const App({Key key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp( //... localizationsDelegates: const [ GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, GlobalCupertinoLocalizations.delegate, // This is required ], ); } } ``` ## The input text color same with backgound when using CupertinoTextInputDialog This fixes the problem. ```dart import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart' hide Router; class App extends StatelessWidget { const App({Key key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp( darkTheme: ThemeData( cupertinoOverrideTheme: const CupertinoThemeData( textTheme: CupertinoTextThemeData(), // This is required ), ), ); } } ```