easy_handler 1.0.2 copy "easy_handler: ^1.0.2" to clipboard
easy_handler: ^1.0.2 copied to clipboard

Easy Handler helps you to write shorter syntax

example/lib/main.dart

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

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String text = '';

  @override
  void initState() {
    super.initState();
    afterBuild((() {
      setState(() {
        text = "Hammad Parveez";
      });
    }));
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        floatingActionButton: ElevatedButton(
          onPressed: () {},
          child: const Text("Tap me"),
          style: ButtonStyle(
            backgroundColor: setProp(Colors.purple),
            foregroundColor: setProp(Colors.white),
            elevation: setProp(10),
            padding: setProp(
              EdgeInsets.symmetric(horizontal: 10),
            ),
          ),
        ),
        appBar: AppBar(
          title: const Text('Easy Handler'),
        ),
        body: Center(child: Text("After layout: $text")),
      ),
    );
  }
}
8
likes
110
pub points
4%
popularity

Publisher

verified publisherdevhammad.com

Easy Handler helps you to write shorter syntax

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on easy_handler