Created
January 14, 2022 02:27
-
-
Save bleonard252/d8243b90e7bd99d7352bf2cc00eb0f02 to your computer and use it in GitHub Desktop.
Aqua chat format demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
import 'dart:async'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
debugShowCheckedModeBanner: false, | |
theme: ThemeData( | |
primarySwatch: Colors.lightBlue, | |
), | |
home: MyHomePage(), | |
); | |
} | |
} | |
class MyHomePage extends StatefulWidget { | |
@override | |
_MyHomePageState createState() => _MyHomePageState(); | |
} | |
class _MyHomePageState extends State<MyHomePage> { | |
List events = []; | |
int i = 0; | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text(":troll:"), | |
), | |
body: ListView(reverse: true, children: [ | |
Row(crossAxisAlignment: CrossAxisAlignment.start, children: [ | |
Padding( | |
child: CircleAvatar( | |
foregroundImage: NetworkImage( | |
"https://cdn.discordapp.com/guilds/823652880987717713/users/133040188082487296/avatars/1cd59e727365f71b937a8b8d0f3f705f.webp?size=80")), | |
padding: EdgeInsets.all(8.0) | |
), | |
Expanded( | |
child: Padding( | |
padding: EdgeInsets.all(8.0), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Text("flesh roots • 😊❤️⏹️ • 4:20 PM", | |
style: Theme.of(context).textTheme.caption), | |
Text("This is an example message!") | |
])) | |
) | |
]), | |
//--- | |
Row(crossAxisAlignment: CrossAxisAlignment.start, children: [ | |
Padding( | |
child: CircleAvatar( | |
foregroundImage: NetworkImage( | |
"https://cdn.discordapp.com/avatars/370906966488252416/6d8f7ad6ebb205875c08adc9d32f7842.webp?size=80")), | |
padding: EdgeInsets.all(8.0) | |
), | |
Expanded( | |
child: Padding( | |
padding: EdgeInsets.all(8.0), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Text("Lars • ⏹️ • 4:19 PM", | |
style: Theme.of(context).textTheme.caption), | |
Text("This is a really long message meant to test the length of messages. This is a really long message meant to test the length of messages. This is a really long message meant to test the length of messages. This is a really long message meant to test the length of messages. This is a really long message meant to test the length of messages. This is a really long message meant to test the length of messages.") | |
])) | |
) | |
]) | |
]), | |
); | |
} | |
static final List allEvents = [ | |
{"message": ""} | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment