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
def add_layer(triangle): | |
# Add a layer to Pascal's triangle. | |
# Each layer should be a tuple. | |
last = triangle[-1] | |
newTuple = [] | |
for i in range(len(last)): | |
newTuple.append(last[i] + last[i-1]) | |
newTuple.append(1) | |
triangle.append(tuple(newTuple)) | |
pass |
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
cannot add library /Users/pedromassango/fuchsia/prebuilt/third_party/aemu/mac-x64/emulator-darwin-aarch64-0.2/qemu/darwin-aarch64/lib64/vulkan/libvulkan.dylib: failed | |
cannot add library /Users/pedromassango/fuchsia/prebuilt/third_party/aemu/mac-x64/emulator-darwin-aarch64-0.2/lib64/vulkan/libvulkan.dylib: failed | |
cannot add library /Users/pedromassango/fuchsia/prebuilt/third_party/aemu/mac-x64/emulator-darwin-aarch64-0.2/qemu/darwin-aarch64/lib64/vulkan/libMoltenVK.dylib: failed | |
added library /Users/pedromassango/fuchsia/prebuilt/third_party/aemu/mac-x64/emulator-darwin-aarch64-0.2/lib64/vulkan/libMoltenVK.dylib | |
[mvk-info] MoltenVK version 1.1.1. Vulkan version 1.1.154. | |
The following 70 Vulkan extensions are supported: | |
VK_KHR_16bit_storage v1 | |
VK_KHR_8bit_storage v1 | |
VK_KHR_bind_memory2 v1 |
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
/// The main screen launched with Navigator.push(...) | |
/// the question is where do I load the data of the EmailPage, without making it a StatefulWidget? | |
/// I guess we can solve that by adding a callback on the BlocBuilder widget. | |
class RegistrationFlow extends StatelessWidget { | |
const RegistrationFlow({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return MultiBlocProvider( |
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
testWidgets('Ellipsis is passed to the inner TextPainter when provided', (WidgetTester tester) async { | |
await tester.pumpWidget( | |
const MaterialApp( | |
home: Material( | |
child: SelectableText( | |
'overflow', | |
maxLines: 1, | |
style: TextStyle(overflow: TextOverflow.ellipsis), | |
), | |
), |
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
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'dart:async'; | |
import 'package:analyzer/dart/ast/ast.dart'; | |
import 'package:analyzer/dart/ast/visitor.dart'; | |
import 'package:analyzer/dart/element/element.dart'; | |
import 'package:analyzer/dart/element/type.dart'; |
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'; | |
void main() => runApp( | |
RootRestorationScope( | |
restorationId: 'root_id', | |
child: App(), | |
), | |
); | |
class App extends StatelessWidget { |
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'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( |
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'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
final _controller = TextEditingController(text: 'Please select me!'); | |
@override |
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'; | |
void main() { | |
//final GlobalKey<FormState> _formState = GlobalKey(); | |
final GlobalKey<FormFieldState> _formFieldState = GlobalKey(); | |
runApp(MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( | |
visualDensity: VisualDensity.adaptivePlatformDensity, |
NewerOlder