Reputation: 12293
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?
Upvotes: 5
Views: 3542
Reputation: 4392
Import import 'dart:io'
And then in your widget make if statement
if(Platform.isIOS){
...
} else {
...
}
Upvotes: 7