showFullPageCityPicker static method

Future<Result?> showFullPageCityPicker({
  1. required BuildContext context,
  2. ThemeData? theme,
  3. ShowType showType = ShowType.pca,
  4. String locationCode = '110000',
  5. Map<String, dynamic>? citiesData,
  6. Map<String, String>? provincesData,
})

@theme Theme used it's primaryColor

Implementation

static Future<Result?> showFullPageCityPicker({
  required BuildContext context,
  ThemeData? theme,
  ShowType showType = ShowType.pca,
  String locationCode = '110000',
  Map<String, dynamic>? citiesData,
  Map<String, String>? provincesData,
}) {
  return Navigator.push(
    context,
    new PageRouteBuilder(
      transitionDuration: const Duration(milliseconds: 250),
      pageBuilder: (context, _, __) => new Theme(
        data: theme ?? Theme.of(context),
        child: FullPage(
          showType: showType,
          locationCode: locationCode,
          citiesData: citiesData ?? meta.citiesData,
          provincesData: provincesData ?? meta.provincesData,
        ),
      ),
      transitionsBuilder:
          (_, Animation<double> animation, __, Widget child) =>
              new SlideTransition(
        position: new Tween<Offset>(
          begin: Offset(0.0, 1.0),
          end: Offset(0.0, 0.0),
        ).animate(animation),
        child: child,
      ),
    ),
  );
}