Skip to content

Instantly share code, notes, and snippets.

@Pregum
Pregum / main.dart
Created July 30, 2022 15:21
gantt_chart_ui_challenge_an_hour
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@Pregum
Pregum / main.dart
Last active August 6, 2022 10:12
Counter example
// 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';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@Pregum
Pregum / main.dart
Created January 18, 2023 11:13
①の回答です。
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@Pregum
Pregum / main.dart
Last active December 6, 2023 23:01
riverpod_3_with_switch_expression
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
void main() {
runApp(const ProviderScope(child: MyApp()));
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
@Pregum
Pregum / platform_list_view.dart
Last active February 15, 2024 23:41
platform_flutter_widgetsを真似た自作ウィジェット
import 'package:flutter/cupertino.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
class PlatformListView extends HookWidget {
final List<Widget> children;
final Widget header;
final Color? backgroundColor;
final bool hasLeading;
final EdgeInsetsGeometry? margin;