basic_project.dart 1.08 KB
Newer Older
1 2 3 4
// Copyright 2018 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.

5
import 'project.dart';
6

7
class BasicProject extends Project {
8 9 10 11

  @override
  final String pubspec = '''
  name: test
12 13 14
  environment:
    sdk: ">=2.0.0-dev.68.0 <3.0.0"

15 16 17 18 19 20 21 22
  dependencies:
    flutter:
      sdk: flutter
  ''';

  @override
  final String main = r'''
  import 'package:flutter/material.dart';
23

24
  void main() => runApp(new MyApp());
25

26 27 28 29
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      topLevelFunction();
30
      return new MaterialApp( // BREAKPOINT
31 32 33 34 35 36 37
        title: 'Flutter Demo',
        home: new Container(),
      );
    }
  }

  topLevelFunction() {
38
    print("topLevelFunction"); // TOP LEVEL BREAKPOINT
39 40 41
  }
  ''';

42 43
  Uri get buildMethodBreakpointUri => breakpointUri;
  int get buildMethodBreakpointLine => breakpointLine;
44

45
  Uri get topLevelFunctionBreakpointUri => breakpointUri;
46
  int get topLevelFunctionBreakpointLine => lineContaining(main, '// TOP LEVEL BREAKPOINT');
47
}