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