changelog_widgets 1.1.0 copy "changelog_widgets: ^1.1.0" to clipboard
changelog_widgets: ^1.1.0 copied to clipboard

Flutter package to read 'CHANGELOG.md' file and display it in the app as a widget.

example/example.md

Examples #

Material example #


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

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


class MyMaterialApp extends StatelessWidget {

  const MyMaterialApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      home: const MaterialScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    const space = SizedBox.square(dimension: gap);

    return Scaffold(
      appBar: AppBar(
        title: const Text('Material Screen'),
      ),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            ElevatedButton(
              child: const Text(goToTheRawScreen),
              onPressed: () {
                final screen = ChangelogRawScreen(
                  onLoading: (_) {
                    return const Center(
                      child: Text('Loading file'),
                    );
                  },
                  onError: (_) {
                    return const Center(
                      child: Text('Error'),
                    );
                  },
                  bodyBuilder: (_, markdown) {
                    return markdown;
                  },
                );
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (_) => screen),
                );
              },
            ),
            space,
            ElevatedButton(
              child: const Text(goToTheScreen),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (_) => const ChangelogScreen()),
                );
              },
            ),
            space,
            ElevatedButton(
              child: const Text(showTheDialog),
              onPressed: () {
                showDialog(
                  context: context,
                  builder: (BuildContext context) {
                    return const ChangelogDialog();
                  },
                );
              },
            ),
          ],
        ),
      ),
    );
  }
}

2
likes
150
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter package to read 'CHANGELOG.md' file and display it in the app as a widget.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_markdown

More

Packages that depend on changelog_widgets