Skip to content

Instantly share code, notes, and snippets.

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 / FuckFandom.txt
Last active February 27, 2024 19:22
Filter for uBlock Origin that removes most of Fandom's elements from a Gamepedia wiki.
![Adblock Plus 2.0]
! Title: FuckFandom
! Expires: 30 days (update frequency)
! Homepage: https://gist.github.com/Craftplacer/04089c2c666c89e10818124c92d9c65b
fandom.com##.mcf-wrapper
fandom.com##.wds-global-footer
fandom.com##.global-navigation
fandom.com##.top-ads-container