본문 바로가기

Scaffold8.2

Flutter 경로에 대한 생성기를 찾을 수 없습니다., Could not find a generator for route 질문 플러터에 대해 초보자이며 플러터에서 라우트와 페이징에 관한 예외를 받았습니다. 제스처를 처리하는 동안 다음 단언문이 발생했습니다: _MaterialAppState에서 "/listadecompras" 경로에 대한 생성기를 찾을 수 없습니다. 코드에서 일부 발췌: import 'package:flutter/material.dart'; class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( // ... return new ListTile( onTap: () { Navigator.pushNamed(context, "/listadecompras"); }, // ... }.. 2023. 12. 18.
Flutter 플러터에서 AppBar의 높이를 어떻게 얻을 수 있나요?, How to get AppBar height in Flutter 질문 Flutter에서 AppBar의 높이를 어떻게 얻을 수 있을까요? 저는 MarialApp 위젯('package:flutter/material.dart')을 사용하고 있습니다. Context의 높이를 가지고 있으며, appbar의 높이를 빼고 싶습니다. final double height = MediaQuery.of(context).size.height; 답변 이것은 아마도 이상적인 방법은 아니라고 생각하지만 작동할 것입니다. 먼저 사용할 AppBar 위젯을 Scaffold에 선언하세요. Widget demoPage() { AppBar appBar = AppBar( title: Text('데모'), ); return Scaffold( appBar: appBar, body: /* 페이지 본문 */, ).. 2023. 8. 16.