mirror of
https://github.com/foss42/apidash.git
synced 2025-05-28 12:18:06 +08:00
wip: history panes
This commit is contained in:
@ -32,3 +32,24 @@ class MethodBox extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class StatusCode extends StatelessWidget {
|
||||
const StatusCode({super.key, required this.statusCode, this.style});
|
||||
final int statusCode;
|
||||
final TextStyle? style;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final brightness = Theme.of(context).brightness;
|
||||
final Color color =
|
||||
getResponseStatusCodeColor(statusCode, brightness: brightness);
|
||||
return Text(
|
||||
statusCode.toString(),
|
||||
style: style?.copyWith(color: color) ??
|
||||
Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
fontFamily: kCodeStyle.fontFamily,
|
||||
color: color,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user