Skip to content

Instantly share code, notes, and snippets.

View edemekong's full-sized avatar
🏠
Working from home

Paul Jeremiah edemekong

🏠
Working from home
View GitHub Profile
extension on WidgetTester {
Future<void> launchApp() async {
await app.main();
await pumpAndSettle();
}
Future<void> clearState() async {
await SharedPreferences.getInstance().then((it) => it.clear());
}
@edemekong
edemekong / chat_message_render_box.dart
Created September 22, 2023 17:54 — forked from craiglabenz/chat_message_render_box.dart
Demonstrates a custom RenderObject that draws chat messages like WhatsApp, where the `sentAt` timestamp is tucked into the last line if it fits
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override