This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension EdgeInsets { | |
func copyWith(top: CGFloat? = nil, leading: CGFloat? = nil, bottom: CGFloat? = nil, trailing: CGFloat? = nil) -> EdgeInsets { | |
return EdgeInsets.init(top: top ?? self.top, leading: leading ?? self.leading, bottom: bottom ?? self.bottom, trailing: trailing ?? self.trailing) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class CustomPage extends StatelessWidget { | |
const CustomPage({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return Container(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CloseKeyboardView extends StatelessWidget { | |
const CloseKeyboardView({super.key, required this.child}); | |
final Widget child; | |
@override | |
Widget build(BuildContext context) { | |
return InkWell( | |
onTap: () => FocusScope.of(context).unfocus(), | |
child: child, | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: classlist | |
description: Classlist a education | |
publish_to: "none" | |
version: 0.0.2 | |
environment: | |
sdk: ">=2.17.0 <3.0.0" | |
dependencies: | |
flutter: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension ListViewExtension on ListView { | |
// It will notify to each paging load | |
// You should control the state for your widget | |
Widget onLazyLoads(Future<void> Function() onPagingLoad, {Widget? itemLoadWidget}) { | |
if (childrenDelegate is SliverChildListDelegate) throw Exception('You should use list view builder '); | |
final delegate = childrenDelegate as SliverChildBuilderDelegate; | |
final itemCount = delegate.childCount ?? 0; | |
return NotificationListener<ScrollNotification>( | |
onNotification: (ScrollNotification notification) { | |
if (notification.metrics.pixels == notification.metrics.maxScrollExtent) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SamplePage extends StatefulWidget { | |
const SamplePage({Key? key}) : super(key: key); | |
@override | |
_SamplePageState createState() => _SamplePageState(); | |
} | |
class _SamplePageState extends State<SamplePage> { | |
void _fetchItems() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class PagePadding extends EdgeInsets { | |
static const double _normalValue = 10; | |
const PagePadding.horizontalSymmetric() : super.symmetric(horizontal: _normalValue); | |
const PagePadding.verticalSymmetric() : super.symmetric(vertical: _normalValue); | |
const PagePadding.general() : super.only(right: _normalValue, left: _normalValue, top: _normalValue); | |
const PagePadding.all() : super.all(_normalValue); | |
const PagePadding.onlyLeft() : super.only(left: _normalValue); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code --install-extension 1yib.nodejs-bundle | |
code --install-extension 1yib.svelte-bundle | |
code --install-extension aaron-bond.better-comments | |
code --install-extension adpyke.codesnap | |
code --install-extension adrianwilczynski.add-reference | |
code --install-extension adrianwilczynski.asp-net-core-switcher | |
code --install-extension adrianwilczynski.blazor-snippet-pack | |
code --install-extension adrianwilczynski.csharp-to-typescript | |
code --install-extension adrianwilczynski.libman | |
code --install-extension adrianwilczynski.namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private func registerDefaultsFromSettingsBundle() | |
{ | |
guard let settingsUrl = Bundle.main.url(forResource: "Settings", withExtension: "bundle")?.appendingPathComponent("Root.plist") else | |
{ return } | |
guard let settingsPlist = NSDictionary(contentsOf: settingsUrl) else { return } | |
guard let preferences = settingsPlist["PreferenceSpecifiers"] as? [NSDictionary] else { return } | |
var defaultsToRegister = Dictionary<String, Any>() | |
for preference in preferences { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flutter pub run pigeon \ | |
--input pigeons/configuration.dart \ | |
--dart_out lib/native/configuration.dart \ | |
--objc_header_out ios/Runner/configuration.h \ | |
--objc_source_out ios/Runner/configuration.m |