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

Easy Handler helps you to avoid long statement and make code more readable

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))),
        appBar: AppBar(
          title: const Text('Easy Handler'),
        ),
        body: Center(child: Text("After layout: $text")),
      ),
    );
  }
}
8
likes
140
pub points
3%
popularity

Publisher

verified publisherdevhammad.com

Easy Handler helps you to avoid long statement and make code more readable

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on easy_handler