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
| <!DOCTYPE html> | |
| <html lang="de"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
| <title>Gastro hoch drei – Demo starten</title> | |
| <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap" rel="stylesheet"> | |
| <style> | |
| :root { | |
| --purple: #B4AFE1; |
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:flutter_bloc/flutter_bloc.dart'; | |
| // Here we have the complex shopify logic that only works with the correct credentials | |
| class MyService { | |
| Future<bool> signIn(String email, String password) async { | |
| // Contains complex API implementation stuff | |
| await Future.delayed(const Duration(seconds: 2)); | |
| return true; | |
| } | |
| } |
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:async'; | |
| import 'dart:math'; | |
| import 'package:bloc/bloc.dart'; | |
| Future<void> main() async { | |
| // "synchronous" data structures | |
| final a = 3; | |
| final list = [1, 2, 3, 4, 5]; |
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
| export async function onRequest(context) { | |
| const { | |
| request, // same as existing Worker API | |
| env, // same as existing Worker API | |
| params, // if filename includes [id] or [[path]] | |
| waitUntil, // same as ctx.waitUntil in existing Worker API | |
| next, // used for middleware or to fetch assets | |
| data, // arbitrary space for passing data between middlewares | |
| } = context; |
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
| # admin/config.yml | |
| backend: | |
| name: github | |
| repo: biralo-studio/biralo-studio | |
| branch: main | |
| site_domain: https://biralo.studio | |
| base_url: https://biralo.studio | |
| auth_endpoint: /api/auth | |
| media_folder: assets/images | |
| public_folder: /assets/images |
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: unused_local_variable | |
| Future<void> main() async { | |
| final start = DateTime.now(); | |
| final firstFuture = Future<int>.delayed(const Duration(seconds: 1), () => 1); | |
| final secondFuture = Future<double>.delayed(const Duration(seconds: 1), () => 1.0); | |
| final thirdFuture = Future<String>.delayed(const Duration(seconds: 1), () => '1'); | |
| // static types are given |
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:bloc/bloc.dart'; | |
| // Business LOgic Component | |
| class CounterCubit extends Cubit<int> { | |
| CounterCubit(int? initialValue) : super(initialValue ?? 0); | |
| void increment() { | |
| emit(state + 1); | |
| } |
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'; | |
| Future<int> asyncFunc() async { | |
| final a = Future<int>.delayed(const Duration(seconds: 3), () => 10); | |
| final result = await a; | |
| return result; | |
| } | |
| Future<void> main() async { | |
| /* |
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:cron_consume_microservice/cron_consume_microservice.dart' | |
| as cron_consume_microservice; | |
| import 'dart:convert'; | |
| import 'dart:io'; | |
| import 'package:shelf/shelf.dart' as shelf; | |
| import 'package:shelf/shelf_io.dart' as io; | |
| import 'package:shelf_router/shelf_router.dart'; | |
| void main(List<String> arguments) { |
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:flutter/material.dart'; | |
| class EditorScreen<T> extends StatefulWidget { | |
| final double height; | |
| final double width; | |
| final Widget Function(BuildContext context, T? data) builder; | |
| const EditorScreen({ | |
| Key? key, | |
| this.height = 200, |
NewerOlder