data_repository 0.2.4 copy "data_repository: ^0.2.4" to clipboard
data_repository: ^0.2.4 copied to clipboard

A data repository for flutter, manages both local and remote api access

example/lib/main.dart

import 'package:example/modules/post/views/post_screen.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'dependency_injection.dart';

void main() async {
  await DependencyInjection.bootstrap();
  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Data Repository',
      theme: ThemeData(
        primarySwatch: Colors.deepOrange,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Examples')),
      body: ListView(children: [
        ListTile(
          title: const Text('Post list example'),
          subtitle: const Text('Fetching a list of posts'),
          onTap: () => Navigator.push(
              context, CupertinoPageRoute(builder: (c) => const PostScreen())),
        )
      ]),
    );
  }
}
5
likes
0
pub points
59%
popularity

Publisher

verified publisherwiseminds.cc

A data repository for flutter, manages both local and remote api access

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, http_parser, mime, path_provider

More

Packages that depend on data_repository