mirror of
https://github.com/zoriya/Aeris.git
synced 2026-06-06 12:03:09 +00:00
Pipeline card: set columns
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
/// Enumeration of Services that trigger pipelines
|
||||
enum Service { youtube, discord, gmail, github, twitter, spotify }
|
||||
|
||||
// Class for a service (Youtube, Gmail, ...)
|
||||
class Service {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mobile/src/models/pipeline.dart';
|
||||
import 'package:mobile/src/widgets/aeris_page.dart';
|
||||
import 'package:mobile/src/widgets/pipeline_card.dart';
|
||||
|
||||
@@ -8,6 +9,12 @@ class HomePage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const AerisPage(body: ARCard());
|
||||
return AerisPage(body: PipelineCard(pipeline: Pipeline(
|
||||
id: 10,
|
||||
name: "My Action",
|
||||
triggerCount: 10,
|
||||
lastTrigger: DateTime.now(),
|
||||
enabled: true,
|
||||
parameters: {})));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ class AerisPage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: body,
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
appBar: displayAppbar ? AppBar(
|
||||
title: const Text("AERIS"),
|
||||
centerTitle: true,
|
||||
|
||||
@@ -1,10 +1,39 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:mobile/src/models/pipeline.dart';
|
||||
|
||||
/// Widget for Action-reaction card on home page
|
||||
class PipelineCard extends StatelessWidget {
|
||||
|
||||
// Pipeline base object
|
||||
final Pipeline pipeline;
|
||||
|
||||
const PipelineCard({Key? key, required this.pipeline}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(25),
|
||||
child: Row(children: [
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Column(
|
||||
children: [Text(pipeline.name)],
|
||||
)),
|
||||
Expanded(flex: 4, child: Column(children: [Text(pipeline.name)])),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Column(
|
||||
children: const [
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
color: Colors.grey,
|
||||
)
|
||||
],
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center)),
|
||||
])),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(25))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user