Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2023-156
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-156
2023-156
Commits
afd03dfd
Commit
afd03dfd
authored
Jun 26, 2023
by
Sandun Akalanka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial directory for Community component
parent
bd57d1dc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
0 deletions
+85
-0
lib/community/community_home.dart
lib/community/community_home.dart
+15
-0
lib/community/community_home_backup.dart
lib/community/community_home_backup.dart
+70
-0
No files found.
lib/community/community_home.dart
0 → 100644
View file @
afd03dfd
import
'package:flutter/material.dart'
;
class
CommunityHome
extends
StatefulWidget
{
const
CommunityHome
({
super
.
key
});
@override
State
<
CommunityHome
>
createState
()
=>
_CommunityHomeState
();
}
class
_CommunityHomeState
extends
State
<
CommunityHome
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
();
}
}
lib/community/community_home_backup.dart
0 → 100644
View file @
afd03dfd
import
'package:flutter/material.dart'
;
import
'ask_question.dart'
;
class
CommunityHome
extends
StatefulWidget
{
const
CommunityHome
({
super
.
key
});
@override
State
<
CommunityHome
>
createState
()
=>
_CommunityHomeState
();
}
class
_CommunityHomeState
extends
State
<
CommunityHome
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
body:
SingleChildScrollView
(
child:
Column
(
children:
[
const
Divider
(
height:
10
),
_cardBox
(
context
,
'Ask Question'
,
'images/ask_question.jpg'
,
onPressed:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
const
AskQuestionPage
()),
);
}),
const
Divider
(
height:
10
),
_cardBox
(
context
,
'Browse Community'
,
'images/browse_community.jpg'
,
onPressed:
()
{},
),
//const Divider(height: 10),
],
)));
}
Widget
_cardBox
(
BuildContext
context
,
String
text
,
String
image
,
{
required
void
Function
()
onPressed
})
{
return
Container
(
width:
double
.
infinity
,
height:
200
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
10
),
border:
Border
.
all
(
color:
Colors
.
black
,
width:
2
),
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
text
,
style:
const
TextStyle
(
fontSize:
20
,
color:
Colors
.
black
),
),
Image
.
asset
(
image
,
fit:
BoxFit
.
cover
,
height:
150
,
),
GestureDetector
(
onTap:
onPressed
,
child:
Container
(),
//behavior: HitTestBehavior.translucent,
//onTapDown: onPressed,
),
],
),
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment