prasule/lib/pw/platformroute.dart

10 lines
290 B
Dart
Raw Normal View History

import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
Route<T> platformRoute<T>(Widget Function(BuildContext) builder) =>
(Platform.isIOS)
? CupertinoPageRoute<T>(builder: builder)
: MaterialPageRoute<T>(builder: builder);