This file contains hidden or 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 ApiClient { | |
| ApiClient({ | |
| required String baseURL, | |
| required http.Client client, | |
| List<HttpInterceptor>? interceptors, | |
| }) : _client = HttpClient(baseURL: baseURL, interceptors: interceptors, client: client); | |
| /// HTTP client to send requests | |
| final HttpClient _client; | |
| } |
This file contains hidden or 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
| // ignore_for_file: cascade_invocations | |
| import 'dart:math' as math; | |
| import 'package:flutter/widgets.dart'; | |
| enum BarChartAlignment { start, center } | |
| /// Constructs a bar chart widget. | |
| class BarChartWidget extends LeafRenderObjectWidget { |
This file contains hidden or 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
| FROM alpine:latest | |
| ARG PB_VERSION=0.22.21 | |
| RUN apk add --no-cache \ | |
| unzip \ | |
| ca-certificates | |
| # download and unzip PocketBase | |
| ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip /tmp/pb.zip |
This file contains hidden or 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 'dart:math'; | |
| typedef Stringify<T> = String Function(T item); | |
| /// Utility class to apply Levenshtein score on each items | |
| class SearchResult<T> implements Comparable<SearchResult<T>> { | |
| SearchResult(this.value, {required this.score}); | |
| final double score; |
This file contains hidden or 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:freezed_annotation/freezed_annotation.dart'; | |
| part 'form.freezed.dart'; | |
| @freezed | |
| class FormStatus with _$FormStatus { | |
| // Class representing the status of a form at any given point in time. | |
| const FormStatus._(); | |
| /// The form has not yet been submitted. |
This file contains hidden or 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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:GetBucketLocation", | |
| "s3:ListBucket", | |
| "s3:ListBucketMultipartUploads" | |
| ], |
This file contains hidden or 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
| final Map<String, String> languageFlagMap = { | |
| 'aa': '🇪🇹', // Afar - Ethiopia | |
| 'ab': '🇬🇪', // Abkhaz - Georgia | |
| 'af': '🇿🇦', // Afrikaans - South Africa | |
| 'am': '🇪🇹', // Amharic - Ethiopia | |
| 'ar': '🇪🇬', // Arabic - Egypt | |
| 'as': '🇮🇳', // Assamese - India | |
| 'ay': '🇧🇴', // Aymara - Bolivia | |
| 'az': '🇦🇿', // Azerbaijani - Azerbaijan | |
| 'be': '🇧🇾', // Belarusian - Belarus |
This file contains hidden or 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 { | |
| CanActivate, | |
| ExecutionContext, | |
| HttpException, | |
| HttpStatus, | |
| Injectable, | |
| UnauthorizedException, | |
| } from '@nestjs/common'; | |
| import { AuthenticationService } from './authentication.service'; |
This file contains hidden or 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 'dart:math' as math; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/services.dart'; | |
| class SliverHeader extends SliverPersistentHeaderDelegate { | |
| SliverHeader({ | |
| this.minExtent = 130, | |
| this.leading, | |
| this.middle, | |
| this.trailing, |
This file contains hidden or 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 on WidgetTester { | |
| Future<void> launchApp() async { | |
| await app.main(); | |
| await pumpAndSettle(); | |
| } | |
| Future<void> clearState() async { | |
| await SharedPreferences.getInstance().then((it) => it.clear()); | |
| } |
NewerOlder