graphql_flutter 5.1.2 copy "graphql_flutter: ^5.1.2" to clipboard
graphql_flutter: ^5.1.2 copied to clipboard

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:trash_themes/themes.dart';
import './graphql_bloc/main.dart' show GraphQLBlocPatternScreen;
import './graphql_widget/main.dart' show GraphQLWidgetScreen;
import 'fetchmore/main.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'GraphQL Flutter Demo',
      theme: DraculaTheme().makeDarkTheme(context: context),
      home: Builder(
        builder: (BuildContext context) => Scaffold(
          appBar: AppBar(
            title: const Text('GraphQL Demo App'),
          ),
          body: Center(
            child: Column(
              children: <Widget>[
                Spacer(),
                Flexible(
                    child: ElevatedButton(
                  onPressed: () {
                    Navigator.push(
                      context,
                      MaterialPageRoute<GraphQLWidgetScreen>(
                        builder: (BuildContext context) =>
                            GraphQLBlocPatternScreen(),
                      ),
                    );
                  },
                  child: const Text('GraphQL BloC pattern'),
                )),
                Spacer(),
                Flexible(
                    child: ElevatedButton(
                  onPressed: () {
                    Navigator.push(
                      context,
                      MaterialPageRoute<GraphQLWidgetScreen>(
                        builder: (BuildContext context) =>
                            const GraphQLWidgetScreen(),
                      ),
                    );
                  },
                  child: const Text('GraphQL Widget'),
                )),
                Spacer(),
                Flexible(
                    child: ElevatedButton(
                  onPressed: () {
                    Navigator.push(
                      context,
                      MaterialPageRoute<FetchMoreWidgetScreen>(
                        builder: (BuildContext context) =>
                            const FetchMoreWidgetScreen(),
                      ),
                    );
                  },
                  child: const Text('Fetchmore (Pagination) Example'),
                )),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
815
likes
130
pub points
98%
popularity

Publisher

verified publisherzino.company

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (LICENSE)

Dependencies

connectivity_plus, flutter, flutter_hooks, gql_exec, graphql, hive, meta, path, path_provider, plugin_platform_interface

More

Packages that depend on graphql_flutter