ag_widgets 0.3.2+1 copy "ag_widgets: ^0.3.2+1" to clipboard
ag_widgets: ^0.3.2+1 copied to clipboard

Enhance your apps with our versatile smart widgets. Designed for daily development projects, they streamline workflows and boost functionality.

example/lib/main.dart

import 'package:ag_widgets/ag_widgets.dart';
import 'package:flutter/material.dart';
import 'package:nb_utils/nb_utils.dart';

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

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

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('AG Widgets'),
          elevation: 8,
        ),
        body: SingleChildScrollView(
          padding: EdgeInsets.all(16),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              /// IconImage: This will help you to set the icon which are being loaded from assets or network.
              Divider(thickness: 3, height: 16, color: Colors.black),
              ...[
                Text("Example of IconImage()", style: boldTextStyle(size: 24)),
                SizedBox(height: 16),
                "assets/images/placeholder.jpg"
                    .iconImage(width: 140, height: 90, fit: BoxFit.fill),
              ],
              Divider(thickness: 3, height: 16, color: Colors.black),
              Divider(thickness: 3, height: 0, color: Colors.black),

              SizedBox(height: 32),
              Text(
                'Welcome to Custom Divider Example',
                style: TextStyle(fontSize: 18),
              ),
              SizedBox(height: 20),
              CustomDivider(
                weight: 2.0,
                color: Colors.blue,
                style: DividerStyle.gradientLine,
                colorList: [Colors.blue, Colors.green],
                endIndent: 16.0,
                indent: 16.0,
                strokeCap: StrokeCap.round,
              ),
              SizedBox(height: 20),
              Text(
                'This is a custom divider with a gradient line!',
                style: TextStyle(fontSize: 18),
              ),
              SizedBox(height: 20),
              CustomDivider(
                weight: 2.0,
                color: Colors.blue,
                style: DividerStyle.gradientLine,
                colorList: [Colors.blue, Colors.green],
                endIndent: 16.0,
                indent: 16.0,
                strokeCap: StrokeCap.round,
              ),
              SizedBox(height: 20),
              Text(
                'This is a custom divider with a gradient line!',
                style: TextStyle(fontSize: 18),
              ),
              SizedBox(height: 20),
              CustomDivider(
                weight: 2.0,
                color: Colors.blue,
                style: DividerStyle.gradientLine,
                colorList: [Colors.blue, Colors.green],
                endIndent: 16.0,
                indent: 16.0,
                strokeCap: StrokeCap.round,
              ),
              SizedBox(height: 20),
              Text(
                'This is a custom divider with a gradient line!',
                style: TextStyle(fontSize: 18),
              ),
              SizedBox(height: 20),
              CustomDivider(
                weight: 2.0,
                color: Colors.blue,
                style: DividerStyle.gradientLine,
                colorList: [Colors.blue, Colors.green],
                endIndent: 16.0,
                indent: 16.0,
                strokeCap: StrokeCap.round,
              ),
              SizedBox(height: 20),
              Text(
                'This is a custom divider with a gradient line!',
                style: TextStyle(fontSize: 18),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
5
likes
130
points
90
downloads

Publisher

verified publisherankitgada.in

Weekly Downloads

Enhance your apps with our versatile smart widgets. Designed for daily development projects, they streamline workflows and boost functionality.

Repository (GitHub)
View/report issues

Topics

#widget #extensions #animation #utils #enums

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_svg, flutter_web_plugins, nb_utils, plugin_platform_interface, simple_animations

More

Packages that depend on ag_widgets