diff --git a/mobile/lib/src/models/service.dart b/mobile/lib/src/models/service.dart index 74b54f9..a930936 100644 --- a/mobile/lib/src/models/service.dart +++ b/mobile/lib/src/models/service.dart @@ -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 { diff --git a/mobile/lib/src/views/home_page.dart b/mobile/lib/src/views/home_page.dart index 1638bfa..67a7946 100644 --- a/mobile/lib/src/views/home_page.dart +++ b/mobile/lib/src/views/home_page.dart @@ -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: {}))); } } diff --git a/mobile/lib/src/widgets/aeris_page.dart b/mobile/lib/src/widgets/aeris_page.dart index b22b0e0..6356476 100644 --- a/mobile/lib/src/widgets/aeris_page.dart +++ b/mobile/lib/src/widgets/aeris_page.dart @@ -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, diff --git a/mobile/lib/src/widgets/pipeline_card.dart b/mobile/lib/src/widgets/pipeline_card.dart index 47734cb..e788787 100644 --- a/mobile/lib/src/widgets/pipeline_card.dart +++ b/mobile/lib/src/widgets/pipeline_card.dart @@ -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)))); } -} \ No newline at end of file +}