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'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override |
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'; // Or wherever ActionStateType comes from | |
// --- State Pattern Implementation --- | |
// 0. Define the result type (e.g., an enum) if needed for UI logic | |
enum ActionStateType { ready, answering, complete } | |
// 1. Define the State Interface (or abstract class) | |
abstract class GameState { | |
// Method for the state to determine what the *current* state should be |
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
#!/bin/bash | |
# Script to automate Flutter SDK installation and setup for iOS development on macOS. | |
# Corrected URL finding logic for Intel vs Arm. V1.5 | |
# --- Configuration --- | |
FLUTTER_INSTALL_PARENT_DIR="${HOME}/development" # Default parent directory for Flutter SDK FOLDER | |
FLUTTER_DOCS_URL="https://docs.flutter.dev/get-started/install/macos/mobile-ios" | |
SCRIPT_VERSION="1.5" # Updated Version | |
REPORT_FILE="/tmp/flutter_setup_report_$(date +%s).txt" |
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
//Before: | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('Stepper'), | |
), | |
body: Stepper( | |
steps: widget.steps, | |
currentStep: widget.currentStep, |
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
Center() | |
<| DecoratedBox( | |
decoration: BoxDecoration( | |
color: Colors.white, | |
borderRadius: BorderRadius.circular(20), | |
boxShadow: [ | |
BoxShadow( | |
color: Colors.grey.withValues(alpha: 0.5), | |
offset: Offset(3, 3) | |
) |
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
console.log([...document.querySelectorAll('.active .card')].map(card => card.title.replace(" - Foil", "")).map(title => `1 ${title} (NEO)`).join("\n")) |
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
// Copyright 2017 The Chromium Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
// Note: I'm not the original author, I'm sharing via Gist to make | |
// it easy for folks to check it out. Please email | |
// [email protected] if you have questions about that. | |
// A simple "rough and ready" example of localizing a Flutter app. | |
// Spanish and English (locale language codes 'en' and 'es') are |
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
return new SingleChildScrollView( | |
child: new Container( | |
margin: const EdgeInsets.all(16.0), | |
child: new Row( | |
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
new Expanded(child: new LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints){ |
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="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content="widgets library API docs, for the Dart programming language."> | |
<title>widgets library - Dart API</title> | |
<!-- required because all the links are pseudo-absolute --> |
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> | |
<head> | |
<style> | |
html, | |
body { | |
margin: 0; | |
padding: 0; | |
height: 100%; |
NewerOlder