-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SnapDialog content: use always the same width to avoid size jumping (#32
- Loading branch information
1 parent
e272631
commit 27398cf
Showing
9 changed files
with
160 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
const dialogWidth = 400.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:snapd/snapd.dart'; | ||
import 'package:software/l10n/l10n.dart'; | ||
import 'package:yaru_icons/yaru_icons.dart'; | ||
import 'package:yaru_widgets/yaru_widgets.dart'; | ||
|
||
class SnapConnectionsSettings extends StatelessWidget { | ||
const SnapConnectionsSettings({super.key, required this.connections}); | ||
|
||
final Map<String, SnapConnection> connections; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: const EdgeInsets.only(bottom: 8), | ||
child: YaruExpandable( | ||
isExpanded: true, | ||
header: Text( | ||
context.l10n.connections, | ||
style: const TextStyle(fontWeight: FontWeight.w500), | ||
), | ||
expandIcon: const Icon(YaruIcons.pan_end), | ||
child: Column( | ||
children: [ | ||
if (connections.isNotEmpty) | ||
for (final connection in connections.entries) | ||
Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: [ | ||
Text(connection.key), | ||
Switch( | ||
value: true, | ||
onChanged: (v) {}, | ||
) | ||
], | ||
), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters