random_inspiration_view

A reusable Flutter page that generates colorful inspiration content locally. It is designed to be placed directly inside an application's tab or navigation stack without creating its own MaterialApp.

Features

  • Random theme colors, headings, tags, and statistics.
  • Five locally generated inspiration cards per refresh.
  • Pull-to-refresh and a dedicated refresh button.
  • No network requests or runtime configuration.
  • Optional deterministic random seed for tests and demos.

Getting started

Add the package to your application's pubspec.yaml:

dependencies:
  random_inspiration_view: ^0.0.1

Then fetch dependencies:

flutter pub get

Usage

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

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

  @override
  Widget build(BuildContext context) {
    return const RandomInspirationView();
  }
}

The page inherits the host application's theme and navigation environment. Do not wrap it in another MaterialApp when embedding it in an existing app.

For deterministic content in widget tests, provide a seed:

const RandomInspirationView(randomSeed: 7)

Libraries

random_inspiration_view
A reusable random inspiration page for Flutter applications.