mirror of
https://github.com/foss42/apidash.git
synced 2025-12-01 10:17:47 +08:00
38 lines
925 B
Dart
38 lines
925 B
Dart
import 'package:apidash_design_system/apidash_design_system.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'env_trigger_field.dart';
|
|
|
|
class EnvCellField extends StatelessWidget {
|
|
const EnvCellField({
|
|
super.key,
|
|
required this.keyId,
|
|
this.initialValue,
|
|
this.hintText,
|
|
this.onChanged,
|
|
this.colorScheme,
|
|
});
|
|
|
|
final String keyId;
|
|
final String? initialValue;
|
|
final String? hintText;
|
|
final void Function(String)? onChanged;
|
|
final ColorScheme? colorScheme;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
var clrScheme = colorScheme ?? Theme.of(context).colorScheme;
|
|
return EnvironmentTriggerField(
|
|
keyId: keyId,
|
|
initialValue: initialValue,
|
|
style: kCodeStyle.copyWith(
|
|
color: clrScheme.onSurface,
|
|
),
|
|
decoration: getTextFieldInputDecoration(
|
|
clrScheme,
|
|
hintText: hintText,
|
|
),
|
|
onChanged: onChanged,
|
|
);
|
|
}
|
|
}
|