redacted 1.0.12 copy "redacted: ^1.0.12" to clipboard
redacted: ^1.0.12 copied to clipboard

A package that automatically generate a loading widget from your own widget.

example/lib/main.dart

import 'package:example/headphone_widget.dart';
import 'package:flutter/material.dart';
import 'package:redacted/redacted.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: const Text("Redacted Example"),
      ),
      body: Column(
        children: [
          Padding(
            padding: const EdgeInsets.all(16.0),
            child: Row(
              children: [
                const Expanded(child: HeadphoneWidget()),
                const SizedBox(
                  width: 16,
                ),
                Expanded(
                  child: const HeadphoneWidget().redacted(
                    context: context,
                    redact: true,
                  ),
                )
              ],
            ),
          )
        ],
      ),
    );
  }
}
472
likes
150
points
2.35k
downloads

Publisher

unverified uploader

Weekly Downloads

A package that automatically generate a loading widget from your own widget.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MPL-2.0 (license)

Dependencies

flutter, flutter_svg, measure_size

More

Packages that depend on redacted