5
answers
1
watching
146
views

Testing the triple backticks again for the flutter code to be readable. If this doesn't work no idea how to do it in oneclass. I put triple backticks one line above code and second triple backticks below my code after the last line.

 

```

import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart';
import 'package:todolist/pages/tasklist/tasklist.dart'; import 'package:todolist/pages/tasklistdetails/tasklistdetails.dart';
void main() {   runApp(const MyApp()); }
class MyApp extends StatelessWidget {   const MyApp({super.key});
  @override   Widget build(BuildContext context) {     return MaterialApp(         title: 'Flutter Demo',         theme: ThemeData(           primarySwatch: Colors.blue,           textTheme: GoogleFonts.robotoCondensedTextTheme(),         ),         initialRoute: '/tasklist',         routes: {           '/tasklist': ((context) =>               const TaskListPage(title:"Task List1 Page")),           '/tasklistdetails': ((context) =>               const TaskListDetailsPage(title: "Task List Details Page"))         });   } }
class MyHomePage extends StatefulWidget {   const MyHomePage({super.key, required this.title});   final String title;   @override   State<MyHomePage> createState() => _MyHomePageState(); }
class _MyHomePageState extends State<MyHomePage> {   @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(         title: Text(widget.title),       ),       body: const Text('Task list page'),       floatingActionButton: Theme(         data: Theme.of(context).copyWith(splashColor: Colors.amber),         child: FloatingActionButton(           onPressed: () =>{Navigator.pop(context)},           tooltip: 'Increment',           child: const Icon(Icons.add),         ),       ), // This trailing comma makes auto-formatting nicer for build methods.     );   } } ```

For unlimited access to Homework Help, a Homework+ subscription is required.

Unlock all answers

Get 1 free homework help answer.
Already have an account? Log in
Already have an account? Log in
Already have an account? Log in
Already have an account? Log in
Avatar image
Read by 1 person
Already have an account? Log in

Related questions

Weekly leaderboard

Start filling in the gaps now
Log in