How to split Cupertino/Material in Flutter app depending on app platfrom?

Viewed 2455

How to create (and is it a good practice) a Flutter app which shows Cupertino UI widgets at iOS and Material UI widgets at Android with same functionality?

2 Answers

Import import 'dart:io' And then in your widget make if statement

if(Platform.isIOS){
...
} else {
...
}
Related