| globs | server/queries.sql |
|---|---|
| alwaysApply | false |
ASonly when SQL needs it. Keep column names default.- Params:
:<parameter_name>always. - Nest
JOINs. Multi-table: short aliases. - List queries: paginate unless pagination too messy.
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/scheduler.dart'; | |
| void main() => runApp(const MyApp()); | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @override | |
| Widget build(BuildContext context) { |
| // Copyright (c) 2019, 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 'package:flutter/material.dart'; | |
| import 'dart:async'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { |
| import 'dart:async'; | |
| /// Produces the following output (since [futureOrResult] value is available synchronously): | |
| /// ``` | |
| /// process: 0 | |
| /// result: 0 | |
| /// process: 1 | |
| /// ``` | |
| Future<void> main() async { | |
| unawaited(process()); |
| void main() { | |
| print(DateTime.now()); | |
| print(DateTime.now().toUtc()); | |
| print(DateTime.now().difference(DateTime.now().toUtc())); | |
| } |
| import 'dart:async'; | |
| void main() { | |
| fn1(); | |
| scheduleMicrotask(() { | |
| print('microtask after fn1'); | |
| }); | |
| fn2(); | |
| scheduleMicrotask(() { | |
| print('microtask after fn2'); |
| void main() { | |
| final di = DIContainer(); | |
| final quarterExpenses1 = di.getComputeQuarterExpensesUseCase().perform(100000); | |
| print(quarterExpenses1); | |
| final quarterExpenses2 = di.getComputeQuarterExpensesUseCaseFunction()(100000); | |
| print(quarterExpenses2); | |
| final quarterExpenses3 = di.getExplicitComputeQuarterExpensesUseCaseFunction()(100000); | |
| print(quarterExpenses3); | |
| } |
| Future<void> main() async { | |
| await test(); | |
| } | |
| Future<void> test() async { | |
| try { | |
| return await errorGenerator(); | |
| } catch (e) { | |
| print('!!!CAPTURED ERROR!!!'); | |
| } finally { |
| Future<void> main() async { | |
| await test(); | |
| } | |
| Future<void> test() async { | |
| try { | |
| return errorGenerator(); | |
| } catch (e) { | |
| print('!!!CAPTURED ERROR!!!'); | |
| } finally { |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| const lineHeight = 27.0; | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |