dart format
This commit is contained in:
+3
-1
@@ -449,7 +449,9 @@ class ViewTabGridWidget extends HookConsumerWidget {
|
||||
),
|
||||
child: FloatingActionButton.small(
|
||||
onPressed: () async {
|
||||
final settings = ref.read(generalSettingsWithDefaultsProvider);
|
||||
final settings = ref.read(
|
||||
generalSettingsWithDefaultsProvider,
|
||||
);
|
||||
|
||||
await SearchRoute(
|
||||
tabType:
|
||||
|
||||
+3
-1
@@ -418,7 +418,9 @@ class ViewTabListWidget extends HookConsumerWidget {
|
||||
),
|
||||
child: FloatingActionButton.small(
|
||||
onPressed: () async {
|
||||
final settings = ref.read(generalSettingsWithDefaultsProvider);
|
||||
final settings = ref.read(
|
||||
generalSettingsWithDefaultsProvider,
|
||||
);
|
||||
|
||||
await SearchRoute(
|
||||
tabType:
|
||||
|
||||
+4
-2
@@ -379,7 +379,8 @@ class TabViewHeader extends HookConsumerWidget {
|
||||
);
|
||||
|
||||
if (result?.confirmed == true) {
|
||||
final shouldReopenTabs = result!.reopenTabs;
|
||||
final shouldReopenTabs =
|
||||
result!.reopenTabs;
|
||||
|
||||
try {
|
||||
final closedTabIds = await ref
|
||||
@@ -415,7 +416,8 @@ class TabViewHeader extends HookConsumerWidget {
|
||||
parentId = tabs
|
||||
.firstWhereOrNull(
|
||||
(old) =>
|
||||
old.id == parentId,
|
||||
old.id ==
|
||||
parentId,
|
||||
)
|
||||
?.parentId;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,9 @@ class ContainerEditScreen extends HookConsumerWidget {
|
||||
width: 24,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: ContainerColors.preview(selectedColor.value),
|
||||
color: ContainerColors.preview(
|
||||
selectedColor.value,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
+15
-4
@@ -255,7 +255,10 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
blurRadius: 10,
|
||||
)
|
||||
else
|
||||
BoxShadow(color: displayColor, blurRadius: 10),
|
||||
BoxShadow(
|
||||
color: displayColor,
|
||||
blurRadius: 10,
|
||||
),
|
||||
]
|
||||
: null,
|
||||
border:
|
||||
@@ -277,7 +280,10 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
Text(
|
||||
' ${colors.values.first}',
|
||||
style: TextStyle(
|
||||
color: useWhiteForeground(displayColor)
|
||||
color:
|
||||
useWhiteForeground(
|
||||
displayColor,
|
||||
)
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
),
|
||||
@@ -289,7 +295,9 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
'#${color.toString().replaceFirst('Color(0xff', '').replaceFirst(')', '').toUpperCase()} ',
|
||||
style: TextStyle(
|
||||
color:
|
||||
useWhiteForeground(displayColor)
|
||||
useWhiteForeground(
|
||||
displayColor,
|
||||
)
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -314,7 +322,10 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
child: Text(
|
||||
colors.values.first,
|
||||
style: TextStyle(
|
||||
color: useWhiteForeground(displayColor)
|
||||
color:
|
||||
useWhiteForeground(
|
||||
displayColor,
|
||||
)
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -57,10 +57,7 @@ class ContainerColors {
|
||||
/// [baseColor] The stored container color (typically full opacity)
|
||||
/// [surface] The surface color to blend with (typically from theme)
|
||||
static Color forSurface(Color baseColor, Color surface) {
|
||||
return Color.alphaBlend(
|
||||
baseColor.withValues(alpha: defaultAlpha),
|
||||
surface,
|
||||
);
|
||||
return Color.alphaBlend(baseColor.withValues(alpha: defaultAlpha), surface);
|
||||
}
|
||||
|
||||
/// Returns the preview color showing how the color will appear in the UI.
|
||||
|
||||
@@ -145,7 +145,8 @@ class GeneralSettingsScreen extends HookConsumerWidget {
|
||||
style: switch (generalSettings.defaultCreateTabType) {
|
||||
TabType.regular => null,
|
||||
TabType.private => SegmentedButton.styleFrom(
|
||||
selectedBackgroundColor: AppColors.privateSelectionOverlay,
|
||||
selectedBackgroundColor:
|
||||
AppColors.privateSelectionOverlay,
|
||||
),
|
||||
TabType.child => null,
|
||||
},
|
||||
@@ -206,7 +207,8 @@ class GeneralSettingsScreen extends HookConsumerWidget {
|
||||
TabIntentOpenSetting.regular => null,
|
||||
TabIntentOpenSetting.private =>
|
||||
SegmentedButton.styleFrom(
|
||||
selectedBackgroundColor: AppColors.privateSelectionOverlay,
|
||||
selectedBackgroundColor:
|
||||
AppColors.privateSelectionOverlay,
|
||||
),
|
||||
TabIntentOpenSetting.ask => null,
|
||||
},
|
||||
|
||||
@@ -48,7 +48,10 @@ class TorNotification extends HookConsumerWidget {
|
||||
duration: const Duration(milliseconds: 500),
|
||||
primaryEnd: Alignment.bottomLeft,
|
||||
secondaryEnd: Alignment.topRight,
|
||||
primaryColors: const [AppColors.torActiveGreen, AppColors.torActiveGreen],
|
||||
primaryColors: const [
|
||||
AppColors.torActiveGreen,
|
||||
AppColors.torActiveGreen,
|
||||
],
|
||||
secondaryColors: const [Colors.white, Colors.white],
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12),
|
||||
|
||||
@@ -135,7 +135,8 @@ class SelectableChips<T extends S, S, K> extends StatelessWidget {
|
||||
}
|
||||
|
||||
final item = items[index - prefixListItems.length];
|
||||
final isSelected = selectedItem != null &&
|
||||
final isSelected =
|
||||
selectedItem != null &&
|
||||
itemId(item) == itemId(selectedItem as S);
|
||||
final child = Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0, top: 4.0),
|
||||
@@ -166,10 +167,7 @@ class SelectableChips<T extends S, S, K> extends StatelessWidget {
|
||||
tooltip: itemTooltip?.call(item),
|
||||
backgroundColor: itemBackgroundColor?.call(item),
|
||||
side: isSelected && selectedBorderColor != null
|
||||
? BorderSide(
|
||||
color: selectedBorderColor!,
|
||||
width: 2.0,
|
||||
)
|
||||
? BorderSide(color: selectedBorderColor!, width: 2.0)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user