I see that up today flutter has a beta web support. But if I have some view or in general some functionality that support only mobile devices, how can disable it only when I build for the web? is it possible ?
1 Answer
import 'package:flutter/foundation.dart';
if (kIsWeb) {
// running on the web!
} else {
// NOT running on the web! You can check for additional platforms here.
}
Also if you want to check for inside widget and not show mobile widget
child: kIsWeb ? Container():<Mobile Widget>
https://api.flutter.dev/flutter/foundation/kIsWeb-constant.html