octopod 0.1.0 copy "octopod: ^0.1.0" to clipboard
octopod: ^0.1.0 copied to clipboard

This package provides a handy tool for interacting with the Octopus Energy REST API.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: MyHomePage(),
    );
  }
}

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

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final _octopod = Octopod(apiKey: '<api-key>');

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: ElevatedButton(
          onPressed: () async => await _octopod.getProducts(),
          child: const Text('Get Products'),
        ),
      ),
    );
  }
}
1
likes
0
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

This package provides a handy tool for interacting with the Octopus Energy REST API.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter, freezed_annotation, json_annotation

More

Packages that depend on octopod