Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MobileEventLog
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
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
Data-Logistics-Support
MobileEventLog
Commits
adb5708d
Commit
adb5708d
authored
2 years ago
by
Maximilian Betz
Browse files
Options
Downloads
Patches
Plain Diff
implemented nice pop up for messages in configuration, working but design not done yet
parent
37b3e7a1
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/configuration.dart
+52
-2
52 additions, 2 deletions
lib/configuration.dart
with
52 additions
and
2 deletions
lib/configuration.dart
+
52
−
2
View file @
adb5708d
...
...
@@ -26,7 +26,7 @@ class _MyHomePageState extends State<Configuration> {
String
_status
=
''
;
TextStyle
_statusStyle
=
const
TextStyle
(
color:
Colors
.
black
);
Future
<
void
>
dumpToFile
()
async
{
Future
<
void
>
dumpToFile
(
BuildContext
context
)
async
{
var
date
=
DateTime
.
now
()
.
toUtc
();
var
isoDate
=
date
.
toIso8601String
();
...
...
@@ -53,10 +53,60 @@ class _MyHomePageState extends State<Configuration> {
_statusStyle
=
const
TextStyle
(
color:
Colors
.
green
);
setState
(()
{});
HapticFeedback
.
vibrate
();
_showResultPopup
(
context
,
_status
);
}
}
void
_showResultPopup
(
BuildContext
context
,
String
text
)
async
{
// Declaring and Initializing OverlayState
// and OverlayEntry objects
OverlayState
?
overlayState
=
Overlay
.
of
(
context
);
OverlayEntry
overlayEntry
;
overlayEntry
=
OverlayEntry
(
builder:
(
context
)
{
// You can return any widget you like
// here to be displayed on the Overlay
return
Stack
(
alignment:
Alignment
.
center
,
children:
[
Positioned
(
// Position at 10% of height from bottom
bottom:
MediaQuery
.
of
(
context
)
.
size
.
height
*
0.1
,
child:
Material
(
borderRadius:
BorderRadius
.
circular
(
8.0
),
color:
Colors
.
blue
,
child:
Container
(
padding:
const
EdgeInsets
.
all
(
5.0
),
// Space between Text and Bubble
width:
MediaQuery
.
of
(
context
)
.
size
.
width
*
0.95
,
child:
TextFormField
(
minLines:
1
,
maxLines:
5
,
readOnly:
true
,
autofocus:
false
,
enabled:
false
,
//style: _statusStyle,
controller:
TextEditingController
(
text:
_status
,
),
),
),
),
),
],
);
});
// Inserting the OverlayEntry into the Overlay
overlayState
?.
insert
(
overlayEntry
);
// Awaiting for 5 seconds
await
Future
.
delayed
(
const
Duration
(
seconds:
5
));
// Removing the OverlayEntry from the Overlay
overlayEntry
.
remove
();
}
Future
<
void
>
updateConfiguration
()
async
{
final
EventStoreInstance
event
=
EventStoreInstance
();
String
token
=
''
;
...
...
@@ -246,7 +296,7 @@ class _MyHomePageState extends State<Configuration> {
icon:
const
Icon
(
Icons
.
download
),
label:
const
Text
(
'Dump Events'
),
onPressed:
()
{
dumpToFile
();
dumpToFile
(
context
);
//Reset for debug testing only. //Remove in RELEASE Version:
//database.delete();
...
...
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