webelight_shapes 0.0.1 copy "webelight_shapes: ^0.0.1" to clipboard
webelight_shapes: ^0.0.1 copied to clipboard

Users can use as random circle patterns in Listview, Avatarview OR at any other places.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:webelight_shapes/MountainsCustomPainter.dart';
import 'package:webelight_shapes/RiverFlowCustomPainter.dart';
import 'package:webelight_shapes/SeaCustomPainter.dart';
import 'package:webelight_shapes/webelight_shapes.dart';



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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      home: MyHome(),
    );
  }
}

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

  @override
  _MyHomeState createState() => _MyHomeState();
}

class _MyHomeState extends State<MyHome> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: SafeArea(
          child: Container(
            width: double.infinity,
            height: double.infinity,
            color: Colors.white,
            child: SingleChildScrollView(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [

                  Container(
                    child: webelight.getWebeMountainsShape(220),
                  ),

                  Container(
                    child: webelight.getWebeRiverShape(220),
                  ),

                  Container(
                    child: webelight.getWebeSeaShape(220),
                  ),

                  ElevatedButton(onPressed:() {
                    setState(() {});
                  } , child: Text("Get New Shape"))


                  /*Expanded(
                            child: GridView.count(
                              crossAxisCount: 2,
                              crossAxisSpacing: 10.0,
                              mainAxisSpacing: 10.0,
                              shrinkWrap: true,
                              children: List.generate(20, (index) {
                                return Padding(
                                    padding: const EdgeInsets.all(10.0),
                                    child: Container(
                                      child: RepaintBoundary(
                                        child: CustomPaint(
                                          size: Size(80, 80),
                                          painter: SeaCustomPainter(),
                                        ),
                                      ),
                                    )
                                );
                              },),
                            ),
                          ),
                          */
                ],),
            ),
          ),
        ));
  }
}
4
likes
140
points
4
downloads

Documentation

API reference

Publisher

verified publishergujjuflutterguy.com

Weekly Downloads

Users can use as random circle patterns in Listview, Avatarview OR at any other places.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on webelight_shapes