Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ginkgo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vjrj
ginkgo
Commits
13d49613
Commit
13d49613
authored
10 months ago
by
vjrj
Browse files
Options
Downloads
Patches
Plain Diff
Add contact action
parent
c345e286
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/ui/widgets/contacts_actions.dart
+22
-0
22 additions, 0 deletions
lib/ui/widgets/contacts_actions.dart
with
22 additions
and
0 deletions
lib/ui/widgets/contacts_actions.dart
+
22
−
0
View file @
13d49613
import
'package:easy_localization/easy_localization.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
...
@@ -40,3 +41,24 @@ void onSentContact(BuildContext c, Contact contact) {
...
@@ -40,3 +41,24 @@ void onSentContact(BuildContext c, Contact contact) {
c
.
read
<
PaymentCubit
>()
.
selectUser
(
contact
);
c
.
read
<
PaymentCubit
>()
.
selectUser
(
contact
);
c
.
read
<
BottomNavCubit
>()
.
updateIndex
(
0
);
c
.
read
<
BottomNavCubit
>()
.
updateIndex
(
0
);
}
}
void
addContact
(
ContactsCubit
contactsCubit
,
Contact
newContact
,
BuildContext
context
)
{
contactsCubit
.
addContact
(
newContact
);
ScaffoldMessenger
.
of
(
context
)
.
showSnackBar
(
SnackBar
(
content:
Text
(
tr
(
'contact_added'
)),
),
);
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)
{
return
ContactFormDialog
(
contact:
newContact
,
onSave:
(
Contact
c
)
{
context
.
read
<
ContactsCubit
>()
.
updateContact
(
c
);
ContactsCache
()
.
saveContact
(
c
);
});
},
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment