Skip to content

Commit 661aafb

Browse files
authored
[PR] Filled in journey cards (#117)
* New aftercare advice * Local Journey Showing * Fix style issues * Don't show gif, show images
1 parent 09bb1f8 commit 661aafb

File tree

4 files changed

+83
-6
lines changed

4 files changed

+83
-6
lines changed

assets/loading.gif

8.61 KB
Loading

assets/loading.png

2.4 KB
Loading

lib/blocs/journeys_bloc.dart

+35
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import 'dart:io';
2+
import 'dart:typed_data';
23

34
import 'package:bloc/bloc.dart';
45
import 'package:firebase_messaging/firebase_messaging.dart';
6+
import 'package:flutter/material.dart';
57
import 'package:flutter/widgets.dart';
68
import 'package:inkstep/di/service_locator.dart';
79
import 'package:inkstep/models/artists_entity.dart';
@@ -163,6 +165,39 @@ class JourneysBloc extends Bloc<JourneysEvent, JourneysState> {
163165

164166
print('About to save the journey: $newJourney');
165167
final int journeyId = await journeysRepository.saveJourneys(<EmptyJourneyEntity>[newJourney]);
168+
169+
List<Future<CardModel>> oldCards = [];
170+
171+
if (currentState is JourneysWithUser) {
172+
final JourneysWithUser state = currentState;
173+
oldCards = state.cards;
174+
}
175+
176+
final List<Image> loadingImages = [];
177+
178+
for (int i = 0; i < event.result.images.length; i++) {
179+
final ByteData byteData = await event.result.images[i].requestThumbnail(200, 200);
180+
181+
loadingImages.add(Image.memory(byteData.buffer.asUint8List()));
182+
}
183+
184+
yield JourneysWithUser(cards: [
185+
Future.value(CardModel(
186+
description: event.result.description,
187+
size: event.result.size,
188+
artistId: event.result.artistID,
189+
artistName: '',
190+
userId: userId,
191+
bodyLocation: event.result.position,
192+
images: loadingImages,
193+
quote: TextRange(start: -1, end: -1),
194+
stage: WaitingForQuote(),
195+
index: null,
196+
palette: PaletteGenerator.fromColors([PaletteColor(Colors.blue, 100)]),
197+
journeyId: null,
198+
bookedDate: null))
199+
] + oldCards, user: user, firstTime: firstTime);
200+
166201
if (journeyId == -1) {
167202
print('Failed to save journeys');
168203
yield JourneyError(prev: currentState);

lib/ui/pages/care_screen.dart

+48-6
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class CareScreen extends StatelessWidget {
3535
timeOffset: Duration(days: 1),
3636
preCare: true,
3737
children: <Widget>[
38+
3839
Text('Come sober'),
3940
Text('Hygiene'), // Co// me freshly showered! Tattooing required good hygiene. ],
4041
Text('Prep the tattoo spot'),
@@ -48,6 +49,7 @@ class CareScreen extends StatelessWidget {
4849
timeOffset: Duration(days: 1),
4950
preCare: true,
5051
children: <Widget>[
52+
5153
Text('Your appointment day is finally here! And with it, the usual hits play - '
5254
'"Do I prep the tattoo spot? Should I shave? Can I do a shot to calm my '
5355
'nerves before I get inked? Can I get there early? WHAT DO I WEAR?!"'
@@ -64,18 +66,43 @@ class CareScreen extends StatelessWidget {
6466
description: 'For the first 2 hours',
6567
timeOffset: Duration(hours: 2),
6668
children: <Widget>[
67-
Text('Leave in plastic wrap'),
68-
Text('Only remove after 2 hours'),
69+
Text('Your tattoo is going to be sore for the rest of day one. '
70+
'It might look a bit red and swollen and feel warm to the touch due to blood rushing'
71+
' to the spot while it heals.'),
72+
Text(''),
73+
BulletElement('Be gentle with your freshly inked tattoo, especially once you unwrap it,'
74+
' and avoid touching your tattoo – or letting anyone else touch it!'),
75+
Text(''),
76+
BulletElement('The wrap is basically a temporary bandage. Leave it on for as long as '
77+
'directed by your artist – this can be anything from an hour to the whole day, '
78+
'sometimes even longer.'),
79+
BulletElement('Cut through the wrap carefully using scissors instead of peeling it right '
80+
'off as this could pull out some ink that hasn’t settled yet, especially if you were '
81+
'given a cloth wrap which tends to stick to the skin.'),
82+
BulletElement('Refrain from long and/or hot showers – opt for shorter showers in room '
83+
'temperature water, and try to keep your tattoo from getting wet.'),
84+
BulletElement('For up to 48 hours after getting inked, avoid all of these – sorry, '
85+
'you’re going to have to delay that freshly inked party you were planning on throwing!')
6986
],
7087
),
7188
AdviceSnippet(
7289
timeDescription: 'Week 1: Day 02',
7390
description: 'Caring for a Sore and Itchy Tattoo',
7491
timeOffset: Duration(days: 2),
7592
children: <Widget>[
76-
Text('Do not itch skin'),
77-
Text('Moisturise tattoo area 3 times a day'),
78-
Text('Apply cream every 8 hours'),
93+
Text('You’re likely still going to feel sore on the tattoo area for a few days more, '
94+
'up to a week (or slightly longer for larger or more detailed tattoos).'),
95+
Text(''),
96+
BulletElement('Cleanse and moisturize at least twice during the day and once at '
97+
'night before you sleep – that’s three times a day!'),
98+
Text(''),
99+
BulletElement('Your tattoo might also start to get itchy at this point. '
100+
'And what are we NOT going to do? That’s right, we WILL NOT scratch!'),
101+
BulletElement('Wear loose, comfortable clothing in smooth fabrics.'),
102+
BulletElement('Do not apply any sunscreen or heavy products until your '
103+
'tattoo is fully healed. Keep it out of the sun and water as much as possible.'),
104+
BulletElement('It’s going to be uncomfortable for at least a week, especially if the '
105+
'tattoo is quite large or is placed in a spot that is hard to avoid sleeping on.')
79106
],
80107
),
81108
AdviceSnippet(
@@ -98,7 +125,22 @@ class CareScreen extends StatelessWidget {
98125
timeDescription: 'Week 2',
99126
description: 'Dreaded Tattoo Itch!',
100127
timeOffset: Duration(days: 14),
101-
children: <Widget>[],
128+
children: <Widget>[
129+
Text('You may have heard about this stage already – an itchy tattoo during week 2!'),
130+
Text(''),
131+
BulletElement('Annoying enough just because you have to refrain from scratching, '
132+
'this stage is also hard because your tattoo is going to start peeling and '
133+
'flaking and won’t look its best.'),
134+
Text(''),
135+
BulletElement('The scabs are now fully formed and are starting to come off, '
136+
'which is what is causing the peeling, flaking, and itching.'),
137+
BulletElement('And just like the previous 5 days, what are we not going to do? '
138+
'Scratch, rub, pick at, or pull off the peeling skin.'),
139+
BulletElement('Keep the area very clean and well-moisturized (using a light lotion, '
140+
'preferably your recommended aftercare lotion, or alternatively a light oil '
141+
'such as baby oil).'),
142+
BulletElement('Moisturize after every wash and once before bed.'),
143+
],
102144
),
103145
AdviceSnippet(
104146
timeDescription: 'Week 3',

0 commit comments

Comments
 (0)