version_widget 0.0.5 copy "version_widget: ^0.0.5" to clipboard
version_widget: ^0.0.5 copied to clipboard

A Flutter widget that displays version information with optional changelog date and link.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Version Widget Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Version Widget Demo'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            const Text(
              'Basic Usage:',
              style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
            ),
            const SizedBox(height: 20),
            const VersionWidget(
              version: '1.0.0',
            ),
            const SizedBox(height: 40),
            const Text(
              'With Changelog:',
              style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
            ),
            const SizedBox(height: 20),
            VersionWidget(
              version: '1.0.0',
              changelogUrl:
                  'https://raw.githubusercontent.com/yourusername/yourrepo/main/CHANGELOG.md',
              showDate: true,
              defaultDate: '20240101',
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
0
points
4.43k
downloads

Publisher

verified publishertogaware.com

Weekly Downloads

A Flutter widget that displays version information with optional changelog date and link.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, markdown_tooltip, url_launcher

More

Packages that depend on version_widget