Last updated:
0 purchases
mplatform
Mplatform #
How to use #
import 'package:flutter/foundation.dart';
import 'package:mplatform/mplatform.dart';
void main() {
var platform = Mplatform.current;
//Handle all conditions
switch (platform) {
case Mplatform.android:
case Mplatform.web:
case Mplatform.ios:
case Mplatform.macos:
case Mplatform.windows:
case Mplatform.linux:
case Mplatform.fuchsia:
debugPrint(platform.name);
break;
}
//check for just one condition
if (!Mplatform.isFuchsia) {
debugPrint("Why is fuchsia an option tho 🤔");
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.