Eli Blokh
Eli Blokh

Reputation: 12293

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

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

Answers (2)

Eli Blokh
Eli Blokh

Reputation: 12293

I found Flutter Platform Widgets package, works fine

Upvotes: 0

LonelyWolf
LonelyWolf

Reputation: 4392

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

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

Upvotes: 7

Related Questions