GithubHelp home page GithubHelp logo

th-heartdawn / adaptive_dialog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mono0926/adaptive_dialog

0.0 1.0 0.0 12.09 MB

Show alert dialog or modal action sheet adaptively according to platform.

Home Page: https://pub.dev/packages/adaptive_dialog

License: MIT License

Kotlin 0.10% Ruby 2.07% Swift 1.14% Objective-C 0.03% Dart 73.13% HTML 3.93% Shell 0.10% CMake 5.76% C++ 13.20% C 0.56%

adaptive_dialog's Introduction

adaptive_dialog

Show alert dialog or modal action sheet adaptively according to platform.

Web Demo: https://mono0926.com/adaptive_dialog/


Convenient wrapper of showAlertDialog.

iOS Android
n1 n2

Convenient wrapper of showAlertDialog.

iOS Android
n3 n4
n5 n6

Show Confirmation Dialog. For Cupertino, fallback to ActionSheet.

iOS Android
n3 n5
iOS Android
n7 n8
n9 n10
n11 n12
iOS Android
n1 n2
n3 n4

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.

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.

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
        ),
      ),
    );
  }
}

adaptive_dialog's People

Contributors

mono0926 avatar heartdawnwy avatar lcsvcn avatar krille-chan avatar ted-chiptech avatar dependabot[bot] avatar 838 avatar iametornam avatar junaid1460 avatar nilsreichardt avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.