GithubHelp home page GithubHelp logo

flutterando / asuka Goto Github PK

View Code? Open in Web Editor NEW
83.0 83.0 28.0 2.24 MB

Show Snackbars, dialogs, ModalSheets in a single provider. Simple and Clean.

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

License: MIT License

Kotlin 0.11% Swift 1.52% Objective-C 0.03% Dart 56.61% HTML 0.98% C++ 20.26% C 1.25% CMake 16.86% Ruby 2.36%

asuka's People

Contributors

blackleg15 avatar bwolfs2 avatar develogo avatar efraimrodrigues avatar gustavorw avatar hudsonafonso avatar icarohs7 avatar jacobaraujo7 avatar marcusrohden avatar mateusfccp avatar phcs971 avatar roxyroses avatar tauamendonca avatar toshiossada avatar vitoria-soares avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

asuka's Issues

Define a asuka callback function

I often use asuka to display error messages and these are related to exceptions most of the time.

I feel like it'd be useful to have a handler function called in these situations. For instance, I'd like to have these exceptions logged in my backend application with the stack trace and other details. It'd allow me to be address the error with all the details involved at the exact moment it'd happen.

Missing License

Hello!
Congrats for the great job!
What license do you intend to use with asuka?
Please, specify the licence for this package, so we can legally use it.
Thanks!
PS.: MIT License would be great.

Comportamento incorreto ao pressionar o `backbutton` do Android para remover `DatePicker`

Ao configurar o asuka em um projeto e chamar o showDatePicker para selecionar datas, o backbutton do Android não consegue fazer o pop() do dialog.

O problema pode ser facilmente reproduzido criando um projeto, adicionando o asuka nele e configurando 2 telas onde na segunda tela tenha um botão que chama o DatePicker. Ao abrir o DatePicker e pressionar o backButton do dispositivo o app mantém o DatePicker sendo exibido mas volta para a primeira tela do app.

setState() or markNeedsBuild() called during build.

image

 @override
  Widget build(BuildContext context) {
    return Container(
      child: PageView(
        controller: controller,
        scrollDirection: Axis.horizontal,
        physics: NeverScrollableScrollPhysics(),
        children: [
          ConfirmPasswordPage(
            next: () {
              var entry = OverlayEntry(
                builder: (context) {
                  return Center(
                    child: CircularProgressIndicator(),
                  );
                },
              );

              asuka.addOverlay(entry);
            },
          ),

flutter 3.19.0

../../../../.pub-cache/hosted/pub.dev/asuka-2.2.0/lib/src/asuka_singleton_deprecated.dart:104:10: Error: Expected 0 type arguments.
material.PersistentBottomSheetController<T> showBottomSheet<T>(
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/asuka-2.2.0/lib/src/asuka_singleton.dart:186:12: Error: Expected 0 type arguments.
  material.PersistentBottomSheetController<T> showBottomSheet<T>(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

No named parameter with the name 'constraints'

Estou tentando utilizar no Flutter 2.2.3 e está dando este erro:

.pub-cache/hosted/pub.dartlang.org/asuka-2.0.0+1/lib/src/asuka_singleton.dart:202:5: Error: No named parameter with the name 'constraints'.
[        ] [        ]     constraints: constraints,
[        ] [        ]     ^^^^^^^^^^^
[        ] [        ] /home/####/fvm/versions/2.2.3/packages/flutter/lib/src/material/bottom_sheet.dart:649:12: Context: Found this candidate, but the arguments don't match.
[        ] [        ] Future<T?> showModalBottomSheet<T>({
[        ] [        ]            ^^^^^^^^^^^^^^^^^^^^

Alguém sabe se tem como resolver ou tenho que mudar a versão do Flutter?

how to adjust popup size?

Is it possible to adjust popup size? Because I'm trying to use it in flutter web, it's getting disproportionate to the screen size.

⬇️ It's like this currently ⬇️
image

⬇️ I wanted something like this ⬇️
image

Error: Asuka with modular

image

pubspec.yaml

`version: 1.0.0+1

environment:
sdk: '>=2.18.5 <3.0.0'

dependencies:
flutter:
sdk: flutter

asuka: ^2.0.1+3
cupertino_icons: ^1.0.2
flutter_modular: ^5.0.3
mobx: ^2.1.3
flutter_mobx: ^2.0.6+5
google_fonts: ^3.0.1

dev_dependencies:
flutter_test:
sdk: flutter

flutter_lints: ^2.0.0
mobx_codegen: ^2.1.1
modular_test:
build_runner: ^2.3.2`

Erro ao compilar o projeto utilizando a lib

Utilizo atualmente a versão 1.17.4 do Flutter e ao tentar compilar o projeto recebo um erro informando que os parâmetros barrierColor e useSafeArea não existem.

Clonei o asuka e o flutter para entender o que estava acontecendo e vi que na versão 1.17.4 esses 2 parâmetros não existem ainda. Eles foram implementados neste commit que é uma versão posterior até onde entendi.

Para reproduzir o problema basta abrir o projeto do asuka com o flutter 1.17.4 que a classe asuka_singleton será sinalizada com erro nesses parâmetros.

Asuka broken on Beta / Master

../../.pub-cache/hosted/pub.dev/asuka-2.0.2/lib/src/asuka_singleton.dart:345:29: Error: The argument type 'bool?' can't be assigned to the parameter type 'bool' because 'bool?' is nullable and 'bool' isn't.
      semanticsDismissible: semanticsDismissible,
                            ^
Target kernel_snapshot failed: Exception

Command PhaseScriptExecution failed with a nonzero exit code
** BUILD FAILED **

Asuka removes hero animation

Because the library builds on the MaterialApp it removes the possibility of using Hero Animation.

Sample code:

import 'package:flutter/material.dart';
import 'package:asuka/asuka.dart' as asuka;

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      builder: asuka.builder,
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("First Page"),
      ),
      body: Column(
        children: [
          Spacer(),
          Hero(
            child: Container(
              height: 50,
              width: 50,
              color: Colors.blue,
            ),
            tag: 'hero',
          ),
          Spacer(),
          FlatButton(
            child: Text('text'),
            onPressed: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => SecondPage()),
              );
            },
          ),
        ],
      ),
    );
  }
}

class SecondPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Second Page'),
      ),
      body: Column(
        children: [
          Spacer(),
          FlatButton(
            child: Text('text'),
            onPressed: () {},
          ),
          Spacer(),
          Hero(
            child: Container(
              height: 50,
              width: 50,
              color: Colors.blue,
            ),
            tag: 'hero',
          ),
          Spacer(),
        ],
      ),
    );
  }
}

Adicionar um metodo asuka.pop() sem context

O modular.to.showDialog funcionava com o Modular.to.pop()
agora temos o asuka.showDialog() sem cotexto mas não temos um asuka.pop()
Eu tentei o asuka.showDialog() com o Modular.to.pop() mas não funciona.

Se eu estiver em um metodo que não tem contexto seria bom um asuka.pop() se não eu teria que passar por parametro o contexto do dialog em varios metodos.

Extra arguments error, flutter 3.19

Currently getting an error on Asuka dependency when I try to run one of my projects with the new Flutter 3.19.0 version.

Error (Xcode): ../../../../.pub-cache/hosted/pub.dev/asuka-2.2.0/lib/src/asuka_singleton_deprecated.dart:104:10: Error: Expected 0 type arguments.

Add tests

Currently there's only one test which only checks for assertions. There's no tests that check if the behavior and implementations of the package even work.

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.