ocg_location 0.0.13 copy "ocg_location: ^0.0.13" to clipboard
ocg_location: ^0.0.13 copied to clipboard

discontinued

A new Flutter package project.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:ocg_location/ocg_location.dart';

import 'config/app_config.dart';
import 'screens/home_screen.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    LocationRepository locationRepository =
        LocationGoogleRepository(AppConfig.GOOGLE_API_KEY);
    return MultiBlocProvider(
      providers: [
        BlocProvider<LocationCurrentBloc>(
          create: (context) => LocationCurrentBloc(locationRepository),
        ),
        BlocProvider<LocationSearchBloc>(
          create: (context) => LocationSearchBloc(locationRepository),
        ),
        BlocProvider<LocationDetailBloc>(
          create: (context) => LocationDetailBloc(locationRepository),
        )
      ],
      child: MaterialApp(
        title: 'Location Demo',
        theme: ThemeData(
          visualDensity: VisualDensity.adaptivePlatformDensity,
        ),
        home: HomeScreen(),
      ),
    );
  }
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter package project.

License

BSD-2-Clause (LICENSE)

Dependencies

bloc, dart_geohash, flutter, flutter_bloc, google_maps_flutter, http, json_annotation, location, modal_progress_hud, ocg_app

More

Packages that depend on ocg_location