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

More widgets that will help you make modern apps

example/lib/main.dart

// ignore_for_file: prefer_const_literals_to_create_immutables, prefer_const_constructors, sort_child_properties_last

import 'dart:ui';

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Advanced Widgets',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      debugShowCheckedModeBanner: false,
      home: const MyHomePage(title: 'Advanced 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(
      backgroundColor: Color.fromARGB(255, 240, 240, 240),
      extendBody: true,
      appBar: BlurredAppBar(
        appBar: AppBar(
          backgroundColor: Color.fromARGB(0, 158, 158, 158),
          title: Text(
            widget.title,
            style: TextStyle(color: const Color.fromARGB(255, 0, 0, 0)),
          ),
        ),
        filter: ImageFilter.blur(sigmaX: 50, sigmaY: 50),
      ),
      body: Stack(
        clipBehavior: Clip.none,
        children: [
          SizedBox(
            height: double.infinity,
            child: Image.asset(
              "lib/assets/background.jpg",
              fit: BoxFit.fitHeight,
            ),
          ),
          BackdropFilter(
            filter: ImageFilter.blur(sigmaX: 50, sigmaY: 50),
            child: SizedBox(),
          ),
          SingleChildScrollView(
            child: Center(
              child: Column(
                children: [
                  GradientText(
                    "Advanced Widgets",
                    style: TextStyle(fontSize: 65, fontWeight: FontWeight.bold),
                    gradient: LinearGradient(
                      colors: [
                        Color.fromARGB(255, 0, 0, 0),
                        Color.fromARGB(255, 82, 82, 82),
                        Color.fromARGB(255, 0, 0, 0),
                      ],
                    ),
                  ),
                  SizedBox(height: 150),
                  ModernElevatedButton(
                    elevation: 20,
                    color: Color.fromARGB(45, 184, 184, 184),
                    onPressed: () => print("A"),
                    child: Padding(
                      padding: EdgeInsets.fromLTRB(20, 5, 20, 5),
                      child: Text(
                        "Modern Elevated Button",
                        style: TextStyle(
                          fontSize: 23,
                          color: Colors.white,
                        ),
                      ),
                    ),
                  ),
                  SizedBox(height: 150),
                  Text(
                    "GradientContainer:",
                    style: TextStyle(
                      fontSize: 35,
                    ),
                  ),
                  GradientContainer(
                    container: Container(
                      width: 250,
                      height: 250,
                      decoration: BoxDecoration(
                        color: Color.fromARGB(127, 255, 255, 255),
                        borderRadius: BorderRadius.circular(35),
                      ),
                    ),
                    gradient: LinearGradient(
                      colors: [
                        Color.fromARGB(255, 155, 183, 219),
                        Color.fromARGB(255, 218, 186, 224),
                        Color.fromARGB(255, 225, 233, 236),
                      ],
                    ),
                  ),
                  SizedBox(height: 75),
                  Text(
                    "👇 Scroll Down 👇",
                    style: TextStyle(fontSize: 50),
                  ),
                  SizedBox(height: 75),
                  Text(
                    "GradientOverlay:",
                    style: TextStyle(
                      fontSize: 35,
                    ),
                  ),
                  GradientOverlay(
                    child: Card(
                      color: Colors.white,
                      child: SizedBox(height: 150, width: 150),
                    ),
                    gradient: LinearGradient(
                      colors: [
                        Color.fromARGB(255, 155, 183, 219),
                        Color.fromARGB(255, 218, 186, 224),
                        Color.fromARGB(255, 225, 233, 236),
                      ],
                    ),
                  ),
                  SizedBox(height: 150),
                  Text(
                    "👆 Blurred AppBar 👆",
                    style: TextStyle(fontSize: 50),
                  ),
                  SizedBox(height: 250),
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }
}
3
likes
130
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

More widgets that will help you make modern apps

Repository (GitHub)

Topics

#widget

Documentation

API reference

License

MIT (license)

Dependencies

flutter, path

More

Packages that depend on advanced_widgets