Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'dev' into sliver_toolbar
# Conflicts:
#	example/lib/pages/buttons_page.dart
  • Loading branch information
GroovinChip committed Feb 21, 2023
commit 949d87191d73f136e3a34ff33fcfdfd18561f9b4
300 changes: 36 additions & 264 deletions example/lib/pages/buttons_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,53 +72,29 @@ class _ButtonsPageState extends State<ButtonsPage> {
),
ContentArea(
builder: (context, scrollController) {
return SingleChildScrollView(
controller: scrollController,
padding: const EdgeInsets.all(20),
child: Column(
children: [
const Text('MacosBackButton'),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
MacosBackButton(
onPressed: () => debugPrint('click'),
fillColor: Colors.transparent,
),
const SizedBox(width: 16.0),
MacosBackButton(
onPressed: () => debugPrint('click'),
),
],
),
const SizedBox(height: 20),
const Text('MacosDisclosureButton'),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
MacosDisclosureButton(
isPressed: isDisclosureButtonPressed,
onPressed: () {
debugPrint('click');
setState(() {
isDisclosureButtonPressed =
!isDisclosureButtonPressed;
});
},
),
],
),
const SizedBox(height: 20),
const Text('MacosIconButton'),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
MacosIconButton(
icon: const MacosIcon(
CupertinoIcons.star_fill,
return Column(
children: [
Flexible(
fit: FlexFit.loose,
child: SingleChildScrollView(
controller: scrollController,
padding: const EdgeInsets.all(20),
child: Column(
children: [
const Text('MacosBackButton'),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
MacosBackButton(
onPressed: () => debugPrint('click'),
fillColor: Colors.transparent,
),
const SizedBox(width: 16.0),
MacosBackButton(
onPressed: () => debugPrint('click'),
),
],
),
const SizedBox(height: 20),
const Text('MacosDisclosureButton'),
Expand Down Expand Up @@ -465,223 +441,19 @@ class _ButtonsPageState extends State<ButtonsPage> {
],
),
),
const SizedBox(height: 20),
const Text('MacosSwitch'),
const SizedBox(height: 8),
MacosSwitch(
value: switchValue,
onChanged: (value) {
setState(() => switchValue = value);
},
),
const SizedBox(height: 20),
const Text('MacosPulldownButton'),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
MacosPulldownButton(
title: 'PDF',
items: [
MacosPulldownMenuItem(
title: const Text('Open in Preview'),
onTap: () => debugPrint('Opening in preview...'),
),
MacosPulldownMenuItem(
title: const Text('Save as PDF...'),
onTap: () => debugPrint('Saving as PDF...'),
),
MacosPulldownMenuItem(
enabled: false,
title: const Text('Save as Postscript'),
onTap: () => debugPrint('Saving as Postscript...'),
),
const MacosPulldownMenuDivider(),
MacosPulldownMenuItem(
enabled: false,
title: const Text('Save to iCloud Drive'),
onTap: () => debugPrint('Saving to iCloud...'),
),
MacosPulldownMenuItem(
enabled: false,
title: const Text('Save to Web Receipts'),
onTap: () =>
debugPrint('Saving to Web Receipts...'),
),
MacosPulldownMenuItem(
title: const Text('Send in Mail...'),
onTap: () => debugPrint('Sending via Mail...'),
),
const MacosPulldownMenuDivider(),
MacosPulldownMenuItem(
title: const Text('Edit Menu...'),
onTap: () => debugPrint('Editing menu...'),
),
],
),
const SizedBox(width: 20),
const MacosPulldownButton(
title: 'PDF',
disabledTitle: 'Disabled',
items: [],
),
],
),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
MacosPulldownButton(
icon: CupertinoIcons.ellipsis_circle,
items: [
MacosPulldownMenuItem(
title: const Text('New Folder'),
onTap: () => debugPrint('Creating new folder...'),
),
MacosPulldownMenuItem(
title: const Text('Open'),
onTap: () => debugPrint('Opening...'),
),
MacosPulldownMenuItem(
title: const Text('Open with...'),
onTap: () => debugPrint('Opening with...'),
),
MacosPulldownMenuItem(
title: const Text('Import from iPhone...'),
onTap: () => debugPrint('Importing...'),
),
const MacosPulldownMenuDivider(),
MacosPulldownMenuItem(
enabled: false,
title: const Text('Remove'),
onTap: () => debugPrint('Deleting...'),
),
MacosPulldownMenuItem(
title: const Text('Move to Bin'),
onTap: () => debugPrint('Moving to Bin...'),
),
const MacosPulldownMenuDivider(),
MacosPulldownMenuItem(
title: const Text('Tags...'),
onTap: () => debugPrint('Tags...'),
),
],
),
const SizedBox(width: 20),
const MacosPulldownButton(
icon: CupertinoIcons.square_grid_3x2,
items: [],
),
],
),
const SizedBox(height: 20),
const Text('MacosPopupButton'),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
MacosPopupButton<String>(
value: popupValue,
onChanged: (String? newValue) {
setState(() => popupValue = newValue!);
},
items: <String>['One', 'Two', 'Three', 'Four']
.map<MacosPopupMenuItem<String>>((String value) {
return MacosPopupMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
),
const SizedBox(width: 20),
MacosPopupButton<String>(
disabledHint: const Text('Disabled'),
onChanged: null,
items: null,
),
],
),
const SizedBox(height: 20),
MacosPopupButton<String>(
value: languagePopupValue,
onChanged: (String? newValue) {
setState(() => languagePopupValue = newValue!);
},
items: languages
.map<MacosPopupMenuItem<String>>((String value) {
return MacosPopupMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('System Theme'),
const SizedBox(width: 8),
MacosRadioButton<ThemeMode>(
groupValue: context.watch<AppTheme>().mode,
value: ThemeMode.system,
onChanged: (value) {
context.read<AppTheme>().mode = value!;
},
),
],
),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('Light Theme'),
const SizedBox(width: 24),
MacosRadioButton<ThemeMode>(
groupValue: context.watch<AppTheme>().mode,
value: ThemeMode.light,
onChanged: (value) {
context.read<AppTheme>().mode = value!;
},
),
],
),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('Dark Theme'),
const SizedBox(width: 26),
MacosRadioButton<ThemeMode>(
groupValue: context.watch<AppTheme>().mode,
value: ThemeMode.dark,
onChanged: (value) {
context.read<AppTheme>().mode = value!;
},
),
],
),
const SizedBox(height: 20),
const Text('MacosSegmentedControl'),
const SizedBox(height: 8),
MacosSegmentedControl(
controller: _tabController,
tabs: [
MacosTab(
label: 'Tab 1',
active: _tabController.index == 0,
),
MacosTab(
label: 'Tab 2',
active: _tabController.index == 1,
),
MacosTab(
label: 'Tab 3',
active: _tabController.index == 2,
),
],
),
],
),
),
ResizablePane(
minSize: 50,
startSize: 200,
//windowBreakpoint: 600,
builder: (_, __) {
return const Center(
child: Text('Resizable Pane'),
);
},
resizableSide: ResizableSide.top,
)
],
);
},
),
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.