flutter_waya 1.2.1 copy "flutter_waya: ^1.2.1" to clipboard
flutter_waya: ^1.2.1 copied to clipboard

outdated

The Flutter UI library contains multiple custom components,compatible with android,web,ios and MAC.

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_waya/flutter_waya.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(App());
}

class App extends StatelessWidget {
  Widget build(BuildContext context) {
    return GlobalMaterial(title: 'Waya Demo', home: Home());
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return OverlayScaffold(
      appBar: AppBar(title: Text('Waya Demo'), centerTitle: true),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          SearchBox(width: 200),
          FlatButton(onPressed: () => showModalPopup(), child: Text('点击弹窗')),
          FlatButton(onPressed: () => showOverlayLoading(), child: Text('点击Loading')),
          FlatButton(onPressed: () => showOverlayToast(context), child: Text('点击Toast')),
        ],
      ),
    );
  }

  showOverlayLoading() => showLoading(gaussian: true);

  showOverlayToast(BuildContext context) {
    showToast("0");
    showToast("1");
    showToast("2");
    showToast("3");
    showToast("4");
  }

  showModalPopup() {
    showBottomPagePopup(
        widget: CupertinoActionSheet(
      title: Text('提示'),
      message: Text('是否要删除当前项?'),
      actions: <Widget>[
        CupertinoActionSheetAction(
          child: Text('删除'),
          onPressed: () {},
          isDefaultAction: true,
        ),
        CupertinoActionSheetAction(
          child: Text('暂时不删'),
          onPressed: () {},
          isDestructiveAction: true,
        ),
      ],
    ));
  }
}
8
likes
0
pub points
76%
popularity

Publisher

unverified uploader

The Flutter UI library contains multiple custom components,compatible with android,web,ios and MAC.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

cookie_jar, crypto, dio, flutter, flutter_localizations, pull_to_refresh, synchronized

More

Packages that depend on flutter_waya