mirror of
https://github.com/foss42/apidash.git
synced 2025-05-29 12:59:58 +08:00
fixes env card
This commit is contained in:
@ -193,6 +193,9 @@ class EnvironmentItem extends ConsumerWidget {
|
|||||||
ref.read(selectedEnvironmentIdStateProvider.notifier).state = id;
|
ref.read(selectedEnvironmentIdStateProvider.notifier).state = id;
|
||||||
kEnvScaffoldKey.currentState?.closeDrawer();
|
kEnvScaffoldKey.currentState?.closeDrawer();
|
||||||
},
|
},
|
||||||
|
onSecondaryTap: () {
|
||||||
|
ref.read(selectedEnvironmentIdStateProvider.notifier).state = id;
|
||||||
|
},
|
||||||
focusNode: ref.watch(nameTextFieldFocusNodeProvider),
|
focusNode: ref.watch(nameTextFieldFocusNodeProvider),
|
||||||
onChangedNameEditor: (value) {
|
onChangedNameEditor: (value) {
|
||||||
value = value.trim();
|
value = value.trim();
|
||||||
|
@ -96,6 +96,7 @@ class SidebarEnvironmentCard extends StatelessWidget {
|
|||||||
focusNode: focusNode,
|
focusNode: focusNode,
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
onTapOutside: (_) {
|
onTapOutside: (_) {
|
||||||
|
FocusScope.of(context).unfocus();
|
||||||
onTapOutsideNameEditor?.call();
|
onTapOutsideNameEditor?.call();
|
||||||
},
|
},
|
||||||
onFieldSubmitted: (value) {
|
onFieldSubmitted: (value) {
|
||||||
|
@ -117,17 +117,15 @@ class SidebarRequestCard extends StatelessWidget {
|
|||||||
overflow: TextOverflow.fade,
|
overflow: TextOverflow.fade,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
kIsMobile
|
Visibility(
|
||||||
? Visibility(
|
visible: isSelected && !inEditMode,
|
||||||
visible: isSelected && !inEditMode,
|
child: SizedBox(
|
||||||
child: SizedBox(
|
width: 28,
|
||||||
width: 28,
|
child: ItemCardMenu(
|
||||||
child: ItemCardMenu(
|
onSelected: onMenuSelected,
|
||||||
onSelected: onMenuSelected,
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
: kSizedBoxEmpty,
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -349,11 +349,7 @@ void main() {
|
|||||||
await tester.pump();
|
await tester.pump();
|
||||||
await tester.tap(find.byType(RequestItem));
|
await tester.tap(find.byType(RequestItem));
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
// await tester.tap(find.byIcon(Icons.more_vert).at(1));
|
await tester.tap(find.byIcon(Icons.more_vert).at(1));
|
||||||
await tester.tap(
|
|
||||||
find.byType(RequestItem),
|
|
||||||
buttons: kSecondaryButton,
|
|
||||||
);
|
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
// Tap on the "Rename" option in the menu
|
// Tap on the "Rename" option in the menu
|
||||||
|
Reference in New Issue
Block a user