Skip to content

Instantly share code, notes, and snippets.

View mashik424's full-sized avatar
🇮🇳
Focusing

Ash mashik424

🇮🇳
Focusing
View GitHub Profile
@mashik424
mashik424 / separated_column.dart
Last active October 25, 2023 02:27
This extension allows you to create a new Column/Row with the same properties as an existing one but with separator widgets placed between the children. The separator widgets are generated by the separatorBuilder function, which you need to provide when using this extension.
import 'package:flutter/material.dart';
extension ColumnExtension on Column {
Widget separated(
BuildContext context, {
required WidgetBuilder separatorBuilder,
}) {
return Column(
key: key,
crossAxisAlignment: crossAxisAlignment,
@mashik424
mashik424 / page_progress.dart
Created January 21, 2022 08:22
Flutter: Animated PageView Progress Bar
import 'package:flutter/material.dart';
class PageProgress extends StatefulWidget implements PreferredSizeWidget {
const PageProgress({
Key? key,
required this.context,
required this.pageCount,
this.pageController,
this.progress,
this.duration,
import 'dart:async';
import 'package:bloc/bloc.dart';
import 'package:meta/meta.dart';
part 'timer_event.dart';
part 'timer_state.dart';
class TimerBloc extends Bloc<TimerEvent, TimerState> {
TimerBloc() : super(TimerStopped());