Skip to content

Instantly share code, notes, and snippets.

View Craftplacer's full-sized avatar

Crafti Craftplacer

View GitHub Profile

Utilizing Flutter's testing framework for automatic, accurate screenshots of your app

Every app developer has to submit some kind of screenshot for potential users. This task can be tedious, difficult, time-consuming. Maybe you don't want to setup your app in certain ways so that it works, or looks a specific way.

Flutter is in all regards flexible, it offers great tooling for everything.

So what if, instead of writing tests, we want to create screenshots?

Laying down the foundation

import "package:flutter/material.dart";
class ResponsiveMenu extends StatelessWidget {
final Function(BuildContext context, VoidCallback onTap)? builder;
final List<Widget> Function(
BuildContext context,
VoidCallback? onClose,
) itemBuilder;
const AdaptiveMenu({
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
class SliverCrossAxisAlign extends SingleChildRenderObjectWidget {
final double alignment;
const SliverCrossAxisAlign({
super.key,
required this.alignment,
required Widget sliver,
@Craftplacer
Craftplacer / README.md
Last active April 20, 2024 10:35
Weather app