mirror of
https://github.com/foss42/apidash.git
synced 2025-09-27 17:15:12 +08:00
Dark mode adaptive icons
This commit is contained in:
@ -70,6 +70,18 @@ const kTableThemeData = DaviThemeData(
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const kIconRemoveDark = Icon(
|
||||||
|
Icons.remove_circle,
|
||||||
|
size: 16,
|
||||||
|
color: Color(0xffcf6679),
|
||||||
|
);
|
||||||
|
|
||||||
|
final kIconRemoveLight = Icon(
|
||||||
|
Icons.remove_circle,
|
||||||
|
size: 16,
|
||||||
|
color: Colors.red.withOpacity(0.9),
|
||||||
|
);
|
||||||
|
|
||||||
const kCodePreviewLinesLimit = 500;
|
const kCodePreviewLinesLimit = 500;
|
||||||
const kCodeCharsPerLineLimit = 200;
|
const kCodeCharsPerLineLimit = 200;
|
||||||
|
|
||||||
|
@ -108,7 +108,6 @@ class EditRequestHeadersState extends ConsumerState<EditRequestHeaders> {
|
|||||||
final length = ref.watch(collectionStateNotifierProvider
|
final length = ref.watch(collectionStateNotifierProvider
|
||||||
.select((value) => value![idIdx].requestHeaders?.length));
|
.select((value) => value![idIdx].requestHeaders?.length));
|
||||||
rows = collection[idIdx].requestHeaders ?? [const KVRow("", "")];
|
rows = collection[idIdx].requestHeaders ?? [const KVRow("", "")];
|
||||||
|
|
||||||
DaviModel<KVRow> model = DaviModel<KVRow>(
|
DaviModel<KVRow> model = DaviModel<KVRow>(
|
||||||
rows: rows,
|
rows: rows,
|
||||||
columns: [
|
columns: [
|
||||||
@ -120,7 +119,7 @@ class EditRequestHeadersState extends ConsumerState<EditRequestHeaders> {
|
|||||||
),
|
),
|
||||||
DaviColumn(
|
DaviColumn(
|
||||||
width: 30,
|
width: 30,
|
||||||
cellBuilder: (BuildContext context, DaviRow<KVRow> row) {
|
cellBuilder: (_, row) {
|
||||||
return Text(
|
return Text(
|
||||||
"=",
|
"=",
|
||||||
style: kCodeStyle,
|
style: kCodeStyle,
|
||||||
@ -136,13 +135,11 @@ class EditRequestHeadersState extends ConsumerState<EditRequestHeaders> {
|
|||||||
DaviColumn(
|
DaviColumn(
|
||||||
pinStatus: PinStatus.none,
|
pinStatus: PinStatus.none,
|
||||||
width: 30,
|
width: 30,
|
||||||
cellBuilder: (BuildContext context, DaviRow<KVRow> row) {
|
cellBuilder: (_, row) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
child: Icon(
|
child: Theme.of(context).brightness == Brightness.dark
|
||||||
Icons.remove_circle,
|
? kIconRemoveDark
|
||||||
size: 16,
|
: kIconRemoveLight,
|
||||||
color: Colors.red.withOpacity(0.9),
|
|
||||||
),
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
rows.removeAt(row.index);
|
rows.removeAt(row.index);
|
||||||
seed = random.nextInt(kRandMax);
|
seed = random.nextInt(kRandMax);
|
||||||
|
@ -121,7 +121,7 @@ class EditRequestURLParamsState extends ConsumerState<EditRequestURLParams> {
|
|||||||
),
|
),
|
||||||
DaviColumn(
|
DaviColumn(
|
||||||
width: 30,
|
width: 30,
|
||||||
cellBuilder: (BuildContext context, DaviRow<KVRow> row) {
|
cellBuilder: (_, row) {
|
||||||
return Text(
|
return Text(
|
||||||
"=",
|
"=",
|
||||||
style: kCodeStyle,
|
style: kCodeStyle,
|
||||||
@ -137,13 +137,11 @@ class EditRequestURLParamsState extends ConsumerState<EditRequestURLParams> {
|
|||||||
DaviColumn(
|
DaviColumn(
|
||||||
pinStatus: PinStatus.none,
|
pinStatus: PinStatus.none,
|
||||||
width: 30,
|
width: 30,
|
||||||
cellBuilder: (BuildContext context, DaviRow<KVRow> row) {
|
cellBuilder: (_, row) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
child: Icon(
|
child: Theme.of(context).brightness == Brightness.dark
|
||||||
Icons.remove_circle,
|
? kIconRemoveDark
|
||||||
size: 16,
|
: kIconRemoveLight,
|
||||||
color: Colors.red.withOpacity(0.9),
|
|
||||||
),
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
rows.removeAt(row.index);
|
rows.removeAt(row.index);
|
||||||
seed = random.nextInt(kRandMax);
|
seed = random.nextInt(kRandMax);
|
||||||
|
Reference in New Issue
Block a user