imessage fix (#6)
* first draft : static views wip * refactor to ChatMessage and ChatMessageHeader * add pedantic * fix lints * remove hardcoded message * appBar title : iMessage * format date * cupertino style and model view * fix display of message based on isReceived or sent * SendMessageInput * refactor to MessagesPage * MissingPluginException * use builtins instead of custom stream builders * handle isReceived * delete channel header * fix layout issues in ChannelPreview * fix formatDate * sticky message input * usage of builtin MessageListCore * remove unused imports and a todo * rename channelsStates to channels * replace file imports /w package:imessage/filename * remove size required ChannelNameText * lint and format * sendMessage * transition animation * stream_chat_flutter_core instead * format Date differently if same week * add padding to bubble * remove iMessage text from header * reverse message order * if same day don't display date * padding chat bubble right * remove unused extension * constraint message width * group messages By dates * unused import * fix bug input + layout+ preview onTap * change updatedAt to createdAt * add filter on channel * handle refresh * handle pagination with core LazyLoadScrollView * preview simple medias * upload bug * fix attachment * visual changes to message input * remove size * clean up * wait 5 sec before displaying image(hack) * fix a couple of things * fix padding in channel preview * fix upload + debugShowCheckedModeBanner false * fix overflow and refactor to Divider * fix android build * add imessage clone hero image * update README Co-authored-by: Sacha Arbonel <[email protected]>
This commit is contained in:
co-authored by
Sacha Arbonel
parent
6feccd57dd
commit
f861eb4584
+29
-4
@@ -8,13 +8,17 @@ String formatDate(DateTime date) {
|
||||
}
|
||||
|
||||
String formatDateSameWeek(DateTime date) {
|
||||
final dateFormat = DateFormat('EEEE, hh:mm a');
|
||||
DateFormat dateFormat;
|
||||
if (date.day == DateTime.now().day) {
|
||||
dateFormat = DateFormat('hh:mm a');
|
||||
} else {
|
||||
dateFormat = DateFormat('EEEE, hh:mm a');
|
||||
}
|
||||
return dateFormat.format(date);
|
||||
}
|
||||
|
||||
String formatDateMessage(DateTime date) {
|
||||
final dateFormat =
|
||||
DateFormat('EEE. MMM. d ' 'yy' ' hh:mm a');
|
||||
final dateFormat = DateFormat('EEE. MMM. d ' 'yy' ' hh:mm a');
|
||||
return dateFormat.format(date);
|
||||
}
|
||||
|
||||
@@ -35,7 +39,8 @@ class CupertinoCircleAvatar extends StatelessWidget {
|
||||
height: size,
|
||||
width: size,
|
||||
fit: BoxFit.cover,
|
||||
errorWidget: (context, url, error) { //TODO: this crash the app when getting 404 and in debug mode, see :https://github.com/Baseflow/flutter_cached_network_image/issues/504
|
||||
errorWidget: (context, url, error) {
|
||||
//TODO: this crash the app when getting 404 and in debug mode, see :https://github.com/Baseflow/flutter_cached_network_image/issues/504
|
||||
return CachedNetworkImage(
|
||||
imageUrl:
|
||||
"https://4.bp.blogspot.com/-Jx21kNqFSTU/UXemtqPhZCI/AAAAAAAAh74/BMGSzpU6F48/s1600/funny-cat-pictures-047-001.jpg");
|
||||
@@ -43,3 +48,23 @@ class CupertinoCircleAvatar extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Divider extends StatelessWidget {
|
||||
const Divider({
|
||||
Key key,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: Align(
|
||||
child: Container(
|
||||
height: 1,
|
||||
color: CupertinoColors.systemGrey5,
|
||||
),
|
||||
alignment: Alignment.bottomCenter,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user