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:
@@ -62,6 +62,8 @@ class _DrawerDemoState extends State<DrawerDemo> with TickerProviderStateMixin {
|
||||
switch (Theme.of(context).platform) {
|
||||
case TargetPlatform.android:
|
||||
case TargetPlatform.fuchsia:
|
||||
case TargetPlatform.linux:
|
||||
case TargetPlatform.windows:
|
||||
return Icons.arrow_back;
|
||||
case TargetPlatform.iOS:
|
||||
case TargetPlatform.macOS:
|
||||
|
||||
@@ -413,8 +413,12 @@ class _PlatformItem extends StatelessWidget {
|
||||
return 'Fuchsia';
|
||||
case TargetPlatform.iOS:
|
||||
return 'Cupertino';
|
||||
case TargetPlatform.linux:
|
||||
return 'Material Desktop (linux)';
|
||||
case TargetPlatform.macOS:
|
||||
return 'Material Desktop (macOS)';
|
||||
case TargetPlatform.windows:
|
||||
return 'Material Desktop (Windows)';
|
||||
}
|
||||
assert(false);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user