pro_plus 1.0.3 copy "pro_plus: ^1.0.3" to clipboard
pro_plus: ^1.0.3 copied to clipboard

A Pro Level Package

example/lib/main.dart

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

void main() {
  final DateTime testDate = DateTime.now();
  final patterns = [
    "yyyy-MM-dd",
    "yy-MM-dd",
    "MMMM",
    "MMM",
    "MM",
    "M",
    "dd",
    "d",
    "EEEE",
    "EEE",
    "E",
    "HH:mm:ss",
    "hh:mm:ss a",
    "h:mm:ss a",
    "a",
    "HH",
    "H",
    "hh",
    "h",
    "mm",
    "m",
    "ss",
    "s",
    "SSS",
    "Q",
    "DD",
    "D",
    "ww",
    "w",
    "u",
  ];
  for (var pattern in patterns) {
    try {
      print("Pattern: $pattern => ${testDate.format(pattern: pattern)}");
    } catch (e) {
      print("Pattern: $pattern => Error: $e");
    }
  }
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('Flutter Pro')),
        body: Column(
          children: [
            SizedBox(
              width: double.infinity,
              height: 250,
              child: Stack(
                children: [
                  Image.asset('assets/image.jpg', height: 250,width: double.infinity,fit: BoxFit.fill,),
                  Column(
                    mainAxisSize: MainAxisSize.min,
                    children: [
                      Container(
                        height: 50,
                        width: 200,
                        color: Colors.red.glassEffect(),
                        child: Text('Red Glass Effect').withColor(Colors.white).center(),
                      ).paddingOnly(bottom: 10),
                      Container(
                        color: Colors.red.frostedEffect(),
                        height: 50,
                        width: 200,
                        child: Text('Red Frosted Effect').withColor(Colors.white).center(),
                      ).paddingOnly(bottom: 10),
                      Container(
                        color: Colors.red.glossyFrosted(),
                        height: 50,
                        width: 200,
                        child: Text('Red Glossy Frosted').withColor(Colors.white).center(),
                      ).paddingOnly(bottom: 10),
                      Container(
                        color: Colors.red,
                        height: 50,
                        width: 200,
                        child: Text('Red ').center(),
                      ),
                    ],
                  ).center()
                ],
              ),
            ),

            Text(DateTime.now().format(pattern: 'HH:mm:ss')).paddingAll(16).center().withBackgroundColor(Colors.yellow).withBackgroundGradient([Colors.yellow, Colors.red]),
            Text("with Background Color").paddingAll(16).center().withBackgroundColor(Colors.yellow).withBackgroundGradient([Colors.yellow, Colors.red]),
            Text("with Background Gradient").paddingAll(16).center().withBackgroundGradient([Colors.yellow, Colors.red],),
            Text("with Background Gradient").paddingAll(16).center().withGlossyEffect(overlayColor: Colors.green,glossFactor: 0.5 ),
            Icon(Icons.star, size: 50).withTooltip('I am tool tip ').withBackgroundColor(Colors.green,).paddingOnly(bottom: 10).align(Alignment.centerLeft),
            Text("Press Me").withColor(Colors.white).asColoredButton(backgroundColor: Colors.green).onSingleTap(()=> debugPrint('on Tap Pressed')),
            Divider(),
            Text('List View').center(),
            Divider(),
            Expanded(
              child: List.generate(10,(i)=> 'Item $i').toListView(
                itemBuilder: (context, item, index) => ListTile(title: Text(item)),
              ),
            ),
            Divider(),
            Text('Grid View').center(),
            Divider(),
            Expanded(
              child: List.generate(10,(i)=> 'Item $i').toGridView(
                  itemBuilder: (context, item, index) => ListTile(title: Text(item)),
                  crossAxisCount: 4
              ),
            ),

          ],
        ),
      ),
    );
  }
}
1
likes
140
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

A Pro Level Package

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, intl, plugin_platform_interface, web

More

Packages that depend on pro_plus