Add macOS support (#23)
* Add macOS support * Update README * Update to v0.2.0 * Document breaking changes * Delete widget tests
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DarwinRoleSelector extends StatelessWidget {
|
||||
const DarwinRoleSelector({
|
||||
super.key,
|
||||
required this.isDarwinBrowser,
|
||||
required this.onSelect,
|
||||
});
|
||||
|
||||
final bool isDarwinBrowser;
|
||||
final ValueChanged<bool> onSelect;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Center(
|
||||
child: Text(
|
||||
'You are ${isDarwinBrowser ? 'Browser' : 'Advertiser'}',
|
||||
),
|
||||
),
|
||||
Switch(
|
||||
value: isDarwinBrowser,
|
||||
onChanged: onSelect,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user