flutter_siren 1.1.1 copy "flutter_siren: ^1.1.1" to clipboard
flutter_siren: ^1.1.1 copied to clipboard

One way to notify users when a new version of your app is available and prompt them to upgrade.

example/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_siren/flutter_siren.dart';
void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final siren = Siren();

    return MaterialApp(
      title: 'Flutter Siren Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: Scaffold(
          appBar: AppBar(
            title: const Text('Flutter Siren Demo'),
          ),
          body: Builder(
            builder: (context) => Center(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  const Text(
                    'Press the following button to show the update dialog:',
                  ),
                  TextButton(
                    child: const Text('Check Update'),
                    onPressed: () => siren.promptUpdate(context),
                  )
                ],
              ),
            ),
          )),
    );
  }
}
17
likes
140
pub points
16%
popularity

Publisher

verified publisherdiegocosta.me

One way to notify users when a new version of your app is available and prompt them to upgrade.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, http, package_info_plus, url_launcher, version

More

Packages that depend on flutter_siren