Add a virtual-display (VD) platform view test, and refactor tests a bit. (#161349)
Towards https://github.com/flutter/flutter/issues/161261. Still need to add a HC (Hybrid Composition) variant, but figured I'd do this incrementally to make it easier to review.
This commit is contained in:
@@ -6,11 +6,11 @@ import 'dart:io' as io;
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
/// Throws an [UnsupportedError] if the current platform is not Android or iOS.
|
||||
void ensureAndroidOrIosDevice() {
|
||||
if (kIsWeb || (!io.Platform.isAndroid && !io.Platform.isIOS)) {
|
||||
/// Throws an [UnsupportedError] if the current platform is not Android.
|
||||
void ensureAndroidDevice() {
|
||||
if (kIsWeb || !io.Platform.isAndroid) {
|
||||
throw UnsupportedError(
|
||||
'This app should only run on Android or iOS devices. It uses native '
|
||||
'This app should only run on Android devices. It uses native Android '
|
||||
'plugins that are not developed for other platforms, and would need to '
|
||||
'be adapted to run on other platforms. See the README.md for details.',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user