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