Add Linux and Windows target platforms (#51519)
This PR adds the linux and windows target platform enum values, along with automatically setting the defaultTargetPlatform to the appropriate value on those platforms. Fixes #31366
This commit is contained in:
@@ -83,10 +83,14 @@ class _MyHomePageState extends State<_MyHomePage> {
|
||||
return (await deviceInfo.androidInfo).model;
|
||||
case TargetPlatform.fuchsia:
|
||||
return 'fuchsia';
|
||||
default:
|
||||
case TargetPlatform.macOS:
|
||||
case TargetPlatform.linux:
|
||||
case TargetPlatform.windows:
|
||||
return 'unsupported';
|
||||
break;
|
||||
}
|
||||
break;
|
||||
assert(false, 'Unhandled Theme target platform ${Theme.of(context).platform}.');
|
||||
return 'unsupported';
|
||||
}
|
||||
return 'unknown message: "$message"';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user