moye 2.3.0 copy "moye: ^2.3.0" to clipboard
moye: ^2.3.0 copied to clipboard

A light-weight Flutter package aimed to reduce the amount of code needed to build beautiful and seemless UI.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:moye/moye.dart';
import 'package:moye/widgets/gradient_overlay.dart';

void main() {
  // SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge).then((value) {
  //   runApp(MyApp());
  // });
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      themeMode: ThemeMode.dark,
      darkTheme: ThemeData(brightness: Brightness.dark, useMaterial3: true, colorSchemeSeed: Colors.blue.shade900),
      theme: ThemeData(brightness: Brightness.light, useMaterial3: true, colorSchemeSeed: Colors.blue.shade900),
      home: MyHomePage(),
      debugShowCheckedModeBanner: false,
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        actions: [
          ProgressButton(
            onPressed: () async {
              await Future.delayed(const Duration(seconds: 3));
            },
            child: const Text('Done'),
            icon: Icon(Icons.done),
          ).withPadding(s16HorizontalPadding)
        ],
      ),
      body: SafeArea(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            Column(
              crossAxisAlignment: CrossAxisAlignment.stretch,
              children: [
                Text('Gradient Overlay', style: context.textTheme.headlineLarge.bold),
                s8HeightBox,
                Text('Here is how gradient overlay looks' * 5)
              ],
            ).withGradientOverlay(
              gradient: LinearGradient(
                colors: [
                  context.colorScheme.primary,
                  context.colorScheme.tertiary,
                  context.colorScheme.primary,
                ],
              ),
            ),
            s32HeightBox,
            ProgressButton(
              onPressed: () async {
                await Future.delayed(const Duration(seconds: 1));
              },
              child: const Text('Send Message'),
              icon: Icon(Icons.send),
            )
          ],
        ).withPadding(s16Padding),
      ),
    );
  }
}
0
likes
150
pub points
47%
popularity

Publisher

verified publishermohyaghoub.com

A light-weight Flutter package aimed to reduce the amount of code needed to build beautiful and seemless UI.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on moye