Skip to content

Instantly share code, notes, and snippets.

View timelessfusionapps's full-sized avatar

Murtaza Sulaihi timelessfusionapps

View GitHub Profile
@timelessfusionapps
timelessfusionapps / main.dart
Last active January 4, 2024 12:11
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
@timelessfusionapps
timelessfusionapps / sliverAppBarStatus
Created January 29, 2022 10:57
Show and Hide SliverAppBar title and FlexibleSpaceBar title
import 'dart:math';
import 'package:flutter/material.dart';
class SliverAppBarStatus extends StatefulWidget {
const SliverAppBarStatus({Key? key}) : super(key: key);
@override
_SliverAppBarStatusState createState() => _SliverAppBarStatusState();
}
@timelessfusionapps
timelessfusionapps / sliverAppBarRounded
Created January 29, 2022 10:52
SliverAppBar with Rounded Corners at the bottom
import 'dart:math';
import 'package:english_words/english_words.dart';
import 'package:flutter/material.dart';
class SliverAppBarRounded extends StatefulWidget {
const SliverAppBarRounded({Key? key}) : super(key: key);
@override
_SliverAppBarRoundedState createState() => _SliverAppBarRoundedState();
@timelessfusionapps
timelessfusionapps / main
Created January 29, 2022 10:12
SliverPersistentAppBar inspired by Diego Velasquez.
import 'package:circular_profile_avatar/circular_profile_avatar.dart';
import 'package:flutter/material.dart';
class SliverPersistentAppBar extends StatelessWidget {
const SliverPersistentAppBar({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return SafeArea(
child: Material(
@timelessfusionapps
timelessfusionapps / main
Created September 19, 2021 16:51
Custom TableCalendar
class CustomTableCalendar extends StatefulWidget {
const CustomTableCalendar({Key? key}) : super(key: key);
@override
_CustomTableCalendarState createState() => _CustomTableCalendarState();
}
class _CustomTableCalendarState extends State<CustomTableCalendar> {
final todaysDate = DateTime.now();
var _focusedCalendarDate = DateTime.now();
@timelessfusionapps
timelessfusionapps / main
Last active September 4, 2023 12:30
Flutter showDatePicker example
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}