flower_fire 1.0.4 copy "flower_fire: ^1.0.4" to clipboard
flower_fire: ^1.0.4 copied to clipboard

A comprehensive Flutter package providing customizable UI components, utilities, and services for building modern applications.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flower_fire/widgets/air_quality.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flower Fire Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        useMaterial3: true,
      ),
      home: const AQIScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Flower Demo'),
      ),
      body: SingleChildScrollView(
        padding: const EdgeInsets.all(16.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            // Animation Example
            FlowerAnimation(
              child: const Card(
                child: Padding(
                  padding: EdgeInsets.all(16.0),
                  child: Text('Animated Card'),
                ),
              ),
              animationType: AnimationType.fade,
            ),

            const SizedBox(height: 16),

            // Form Validation Example
            FlowerForm(
              fields: [
                FlowerTextField(
                  label: 'Email',
                  validator: (value) => value?.isEmpty ?? true ? 'Required' : null,
                ),
                FlowerTextField(
                  label: 'Password',
                  isPassword: true,
                  validator: (value) => value?.length ?? 0 < 6 ? 'Too short' : null,
                ),
              ],
              onSubmit: (values) {
                // Handle form submission
                print('Form submitted: $values');
              },
            ),

            const SizedBox(height: 16),

            // Time Conversion Example
            ElevatedButton(
              onPressed: () {
                final convertedTime = FlowerTimeConverter.convert(
                  time: DateTime.now(),
                  fromZone: 'UTC',
                  toZone: 'America/New_York',
                );
                ScaffoldMessenger.of(context).showSnackBar(
                  SnackBar(content: Text('Converted time: $convertedTime')),
                );
              },
              child: const Text('Convert Time'),
            ),

            const SizedBox(height: 16),

            // Unit Conversion Example
            ElevatedButton(
              onPressed: () {
                final convertedValue = FlowerUnitConverter.convert(
                  value: 100,
                  fromUnit: 'km',
                  toUnit: 'miles',
                );
                ScaffoldMessenger.of(context).showSnackBar(
                  SnackBar(content: Text('100 km = $convertedValue miles')),
                );
              },
              child: const Text('Convert Units'),
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
70
points
91
downloads

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter package providing customizable UI components, utilities, and services for building modern applications.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

unknown (license)

Dependencies

fl_chart, flutter, flutter_local_notifications, flutter_rating_bar, geolocator, google_fonts, google_maps_flutter, http, intl, path, path_provider, shared_preferences, sqflite_common_ffi, timezone, url_launcher, video_player, web_socket_channel

More

Packages that depend on flower_fire