status_page 0.2.0 copy "status_page: ^0.2.0" to clipboard
status_page: ^0.2.0 copied to clipboard

outdated

Library to consume Atlassian's Status Page API from dart. Allows to request endpoints of pages, components, and incidents.

example/main.dart

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

main() => runApp(MyApp());

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

  final statusPage = StatusPage(apiKey: 'YOUR_API_KEY');

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Status Page Example'),
        ),
        body: Center(
          child: Column(
            children: [
              const Text(
                'The  component status is: ',
              ),
              ElevatedButton(
                onPressed: () async {
                  try {
                    final page = await statusPage.page('PAGE_ID');
                    print(page.name);
                  } catch (e) {
                    print('Something went wrong');
                  }
                },
                child: const Text(
                  'Get Status',
                ),
              )
            ],
          ),
        ),
      ),
    );
  }
}
15
likes
80
points
21
downloads

Documentation

API reference

Publisher

verified publisherfondeadora.com

Weekly Downloads

Library to consume Atlassian's Status Page API from dart. Allows to request endpoints of pages, components, and incidents.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

dio, equatable, flutter, json_annotation, retrofit

More

Packages that depend on status_page