easy_tips 0.0.1+1 copy "easy_tips: ^0.0.1+1" to clipboard
easy_tips: ^0.0.1+1 copied to clipboard

outdated

easy-to-use loading box.

easy_tips #

简单提示插件.

TODO #

  • 支持明暗主题
  • 支持TOAST吐司
  • 支持动态设置加载文本

Example #

import 'package:flutter/material.dart';
import 'package:easy_tips/easy_tips.dart';

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',
      theme: ThemeData.light(),
      home: EasyWrapContext(   // Context节点
        child: MyHomePage(title: 'Flutter Demo Home Page'),
      ),
    );
  }
}

class MyHomePage extends StatelessWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            RaisedButton(
              child: const Text('加载'),
              onPressed: () async {
                EasyLoading.task(() async {
                  // to do something
                  await Future.delayed(Duration(seconds: 2));
                });
              },
            ),
            RaisedButton(
              child: const Text('加载+文字'),
              onPressed: () {
                EasyLoading.task(() async {
                  // to do something
                  await Future.delayed(Duration(seconds: 2));
                }, text: "Loading...");
              },
            ),
          ],
        ),
      ),
    );
  }
}

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

easy-to-use loading box.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on easy_tips