priyank_widgets 0.0.9 copy "priyank_widgets: ^0.0.9" to clipboard
priyank_widgets: ^0.0.9 copied to clipboard

Priyank Widgets

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Priyank Widget',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Priyank Widget'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ConstantWidget().button(title: 'Button', onPress: (){}),
          ],
        ),
      ),
    );
  }
}
1
likes
130
points
47
downloads

Publisher

verified publisherthepriyank.com

Weekly Downloads

Priyank Widgets

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

cached_network_image, flutter

More

Packages that depend on priyank_widgets