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
Fred
ginkgo
Commits
6b108a28
Commit
6b108a28
authored
1 year ago
by
vjrj
Browse files
Options
Downloads
Patches
Plain Diff
Added FAQ
parent
520275dd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/ui/screens/fifth_screen.dart
+11
-1
11 additions, 1 deletion
lib/ui/screens/fifth_screen.dart
lib/ui/widgets/faq.dart
+46
-0
46 additions, 0 deletions
lib/ui/widgets/faq.dart
with
57 additions
and
1 deletion
lib/ui/screens/fifth_screen.dart
+
11
−
1
View file @
6b108a28
import
'package:easy_localization/easy_localization.dart'
;
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'
;
import
'package:share_plus/share_plus.dart'
;
import
'../../data/models/app_cubit.dart'
;
import
'../../data/models/app_cubit.dart'
;
import
'../../data/models/app_state.dart'
;
import
'../../data/models/app_state.dart'
;
import
'../../data/models/node_type.dart'
;
import
'../../data/models/node_type.dart'
;
import
'../../shared_prefs.dart'
;
import
'../ui_helpers.dart'
;
import
'../ui_helpers.dart'
;
import
'../widgets/bottom_widget.dart'
;
import
'../widgets/bottom_widget.dart'
;
import
'../widgets/card_drawer.dart'
;
import
'../widgets/card_drawer.dart'
;
import
'../widgets/faq.dart'
;
import
'../widgets/fifth_screen/export_dialog.dart'
;
import
'../widgets/fifth_screen/export_dialog.dart'
;
import
'../widgets/fifth_screen/grid_item.dart'
;
import
'../widgets/fifth_screen/grid_item.dart'
;
import
'../widgets/fifth_screen/import_dialog.dart'
;
import
'../widgets/fifth_screen/import_dialog.dart'
;
...
@@ -64,10 +67,11 @@ class FifthScreen extends StatelessWidget {
...
@@ -64,10 +67,11 @@ class FifthScreen extends StatelessWidget {
value:
Locale
(
'nl'
),
value:
Locale
(
'nl'
),
child:
Text
(
'Nederlands'
),
child:
Text
(
'Nederlands'
),
),
),
// Add more DropdownMenuItem for more languages
// Add more DropdownMenuItem for more languages
],
],
),
),
const
TextDivider
(
text:
'faq_title'
),
const
FAQ
(),
const
TextDivider
(
text:
'key_tools_title'
),
const
TextDivider
(
text:
'key_tools_title'
),
GridView
.
count
(
GridView
.
count
(
physics:
const
NeverScrollableScrollPhysics
(),
physics:
const
NeverScrollableScrollPhysics
(),
...
@@ -102,6 +106,12 @@ class FifthScreen extends StatelessWidget {
...
@@ -102,6 +106,12 @@ class FifthScreen extends StatelessWidget {
},
},
);
);
}),
}),
if
(
showShare
())
GridItem
(
title:
'share_your_key'
,
icon:
Icons
.
share
,
onTap:
()
=
>
Share
.
share
(
SharedPreferencesHelper
()
.
getPubKey
())),
GridItem
(
GridItem
(
title:
'copy_your_key'
,
title:
'copy_your_key'
,
icon:
Icons
.
copy
,
icon:
Icons
.
copy
,
...
...
This diff is collapsed.
Click to expand it.
lib/ui/widgets/faq.dart
0 → 100644
+
46
−
0
View file @
6b108a28
import
'package:easy_localization/easy_localization.dart'
;
import
'package:flutter/material.dart'
;
class
FAQ
extends
StatefulWidget
{
const
FAQ
({
super
.
key
});
@override
State
<
FAQ
>
createState
()
=
>
_FAQState
();
}
class
_FAQState
extends
State
<
FAQ
>
{
int
?
_currentIndex
;
@override
Widget
build
(
BuildContext
context
)
{
return
ListView
.
builder
(
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemCount:
5
,
itemBuilder:
(
BuildContext
context
,
int
index
)
{
final
String
question
=
tr
(
'faq_
${index}
_title'
);
final
String
answer
=
tr
(
'faq_
${index}
_desc'
);
return
ExpansionTile
(
key:
Key
(
'builder
$_currentIndex
'
),
title:
Text
(
question
),
initiallyExpanded:
_currentIndex
==
index
,
onExpansionChanged:
(
bool
newState
)
{
if
(
newState
)
setState
(()
{
_currentIndex
=
index
;
});
else
setState
(()
{
_currentIndex
=
-
1
;
});
},
children:
<
Widget
>[
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Text
(
answer
),
),
]);
},
);
}
}
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