added launch buttons
This commit is contained in:
@@ -14,51 +14,95 @@ class ProjectCard extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
GlobalModel gm = Provider.of<GlobalModel>(context);
|
||||
final Project prj = gm.nthPrj(id);
|
||||
return YaruBanner(
|
||||
padding: .only(
|
||||
left: kYaruPagePadding,
|
||||
top: kYaruPagePadding * 0.5,
|
||||
bottom: kYaruPagePadding,
|
||||
right: kYaruPagePadding,
|
||||
),
|
||||
return InkWell(
|
||||
onHover: (st) => gm.setHoverShow(id, st),
|
||||
onTap: () {
|
||||
// var shell = Shell();
|
||||
// Editor edt1 = gm.editors[0];
|
||||
// String comm = edt1.commandTemplate.replaceAll("\$path", prj.path.path);
|
||||
// shell.run(comm);
|
||||
// ScaffoldMessenger.of(context).showSnackBar(
|
||||
// SnackBar(content: Text("Launched "), duration: Duration(seconds: 3)),
|
||||
// );
|
||||
Navigator.pushNamed(context, "/manageprj", arguments: id);
|
||||
borderRadius: .circular(kYaruContainerRadius),
|
||||
onTap: () async {
|
||||
await Navigator.pushNamed(context, "/manageprj", arguments: id);
|
||||
},
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: .start,
|
||||
crossAxisAlignment: .start,
|
||||
child: Card(
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border.all(color: Theme.of(context).dividerColor),
|
||||
// borderRadius: .circular(kYaruContainerRadius),
|
||||
// ),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(
|
||||
kYaruContainerRadius,
|
||||
).inner(const EdgeInsets.all(4)),
|
||||
side: BorderSide(color: Theme.of(context).dividerColor, width: 0),
|
||||
),
|
||||
color: Colors.white,
|
||||
shadowColor: Colors.transparent,
|
||||
child: Row(
|
||||
mainAxisAlignment: .spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"${prj.name}",
|
||||
style: TextStyle(fontSize: 30),
|
||||
overflow: .ellipsis,
|
||||
Container(
|
||||
padding: .only(
|
||||
top: kYaruPagePadding * 0.5,
|
||||
left: kYaruPagePadding * 0.5,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: .start,
|
||||
crossAxisAlignment: .start,
|
||||
children: [
|
||||
Text(
|
||||
"${prj.name}",
|
||||
style: TextStyle(fontSize: 30),
|
||||
overflow: .ellipsis,
|
||||
),
|
||||
Row(
|
||||
spacing: 10,
|
||||
children: [
|
||||
Text("${prj.language}", overflow: .ellipsis),
|
||||
prj.isGit ? Icon(Icons.commit) : Container(),
|
||||
],
|
||||
),
|
||||
gm.getHoverShow(id)
|
||||
? Text("${prj.path.path}", overflow: .ellipsis)
|
||||
: Container(),
|
||||
// gm.getHoverShow(id)
|
||||
// ? IconButton(
|
||||
// icon: Icon(Icons.close),
|
||||
// onPressed: () => gm.delPrj(id),
|
||||
// style: IconButton.styleFrom(
|
||||
// overlayColor: Color(0xffff0000),
|
||||
// ),
|
||||
// )
|
||||
// : Container(),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
spacing: 10,
|
||||
children: [
|
||||
Text("${prj.language}"),
|
||||
prj.isGit ? Icon(Icons.commit) : Container(),
|
||||
Column(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: TextButton(child: Text("Ze"), onPressed: () {}),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: TextButton(child: Text("Ze"), onPressed: () {}),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextButton(child: Text("Ze"), onPressed: () {}),
|
||||
),
|
||||
true
|
||||
? Expanded(
|
||||
child: TextButton(
|
||||
child: Text("Ze"),
|
||||
onPressed: () {},
|
||||
),
|
||||
)
|
||||
: Container(),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
gm.getHoverShow(id) ? Text("${prj.path.path}") : Container(),
|
||||
// gm.getHoverShow(id)
|
||||
// ? IconButton(
|
||||
// icon: Icon(Icons.close),
|
||||
// onPressed: () => gm.delPrj(id),
|
||||
// style: IconButton.styleFrom(
|
||||
// overlayColor: Color(0xffff0000),
|
||||
// ),
|
||||
// )
|
||||
// : Container(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user