asuka 1.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • new69

Asuka #

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

Instalation #

Add in your pubspec.yaml

dependencies:
  asuka: any

now, add in your MaterialApp:

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

MaterialApp(
    builder: asuka.builder,
);

THAT'S IT!

Using #

Snackbars #

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

//use same Scaffold documetation
asuka.showSnackBar(SnackBar(
    content: Text("Hello World"),
));


Overlay #

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

var entry = OverlayEntry(
    builder: (context) {
    return Center(
        child: CircularProgressIndicator(),
    );
  },
);

asuka.addOverlay(entry);

//after
entry.remove();

BottomSheet #

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

//use same Scaffold documetation
asuka.showBottomSheet((context) => Container());

Dialogs #

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

//use same Material documetation
asuka.showDialog(
    builder: (context) => AlertDialog(),
);

Features and bugs #

Please send feature requests and bugs at the issue tracker.

[1.0.3] - 28/06/2020. #

  • Added Overlay

[1.0.2] - 18/06/2020. #

[1.0.0] - 06/06/2020. #

  • First release

example/lib/main.dart

import 'package:example/src/home_page.dart';
import 'package:flutter/material.dart';
import 'package:asuka/asuka.dart' show builder;

import 'src/second/second_page.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.red,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      builder: builder,
      initialRoute: '/',
      routes: {
        '/': (_) => HomePage(title: 'Asuka'),
        '/second': (_) => SecondPage(title: 'Second page'),
      },
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  asuka: ^1.0.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:asuka/asuka.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
72
Health:
Code health derived from static analysis. [more]
56
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
69
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Health issues and suggestions

Fix lib/src/asuka_singleton.dart. (-43.75 points)

Analysis of lib/src/asuka_singleton.dart failed with 2 errors:

line 249 col 7: The named parameter 'barrierColor' isn't defined.

line 250 col 7: The named parameter 'useSafeArea' isn't defined.

Maintenance issues and suggestions

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test