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

outdated

Library to consume Atlassian's Status Page API from dart.

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
0
points
21
downloads

Publisher

verified publisherfondeadora.com

Weekly Downloads

Library to consume Atlassian's Status Page API from dart.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, equatable, flutter, json_annotation, retrofit

More

Packages that depend on status_page