@page:first突然停止使用dompdf

时间:2019-07-16 06:36:21

标签: html css laravel dompdf

昨天我执行了import 'package:flutter/material.dart'; import 'package:flutter_app/circle/firstCircle.dart'; import 'package:flutter_app/circle/secondCircle.dart'; import 'package:flutter_app/circle/thirdCircle.dart'; import 'package:flutter_app/circle/fourthCircle.dart'; import 'package:flutter_app/circle/fifthCircle.dart'; import 'package:flutter/services.dart'; void main(){ runApp(new MaterialApp(home: new MyApp())); } class MyApp extends StatefulWidget{ MyAppState createState() => new MyAppState(); } class MyAppState extends State<MyApp> { @override Widget build(BuildContext context) { SystemChrome.setPreferredOrientations([ DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight, ]); double width = MediaQuery.of(context).size.width; double height = MediaQuery.of(context).size.height; print('Hieght is $height and width is $width'); return new Container( child: Material( color: Colors.white, child: new Center( child: new Stack( children: <Widget>[ new Container( margin: EdgeInsets.all(130.0), decoration: new BoxDecoration( color: Colors.orange, shape: BoxShape.circle, ), ), //First Circle new Positioned( //alignment: AlignmentDirectional(0.0, -0.9), // top: height/25, // left: width/2 - 80, //alignment: Alignment(0,-1.5), child: new GestureDetector( child: Container( //margin: EdgeInsets.only(left: 1.0,right: 1.0), // alignment: AlignmentDirectional(0, 0), width: width/9, height: width/9, //child: Image.asset('assets/one.png'), decoration: BoxDecoration( shape: BoxShape.circle, image: DecorationImage(image: AssetImage('assets/one.png'),), ), ), onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => FirstCircle(),)), ), top: 30, right: 1.0, left: 1.0, ), //Second Circle new Positioned( //alignment: AlignmentDirectional(-0.57, -0.35), child: new GestureDetector( child: Container( width: width/9, height: width/9, // margin: EdgeInsets.only(right: width/2), //child: Image.asset('assets/two.png'), decoration: BoxDecoration( shape: BoxShape.circle, image: DecorationImage(image: AssetImage('assets/two.png'),), ), ), onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => SecondCircle(),)), ), top: height/3, right: rightSize(), left: 1.0, ), //Third Circle new Positioned( //alignment: AlignmentDirectional(0.57, -0.35), child: new GestureDetector( child: Container( width: width/9, height: width/9, // margin: EdgeInsets.only(left: width/2), //child: Image.asset('assets/three.png'), decoration: BoxDecoration( shape: BoxShape.circle, image: DecorationImage(image: AssetImage('assets/three.png'),), ), ), onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => ThirdCircle(),)), ), top: height/3, left: leftSize(), right: 1.0, ), //Fourth Circle new Positioned( // alignment: AlignmentDirectional(-0.35, 0.75), child: new GestureDetector( child: Container( width: width/9, height: width/9, //child: Image.asset('assets/four.png'), decoration: BoxDecoration( shape: BoxShape.circle, image: DecorationImage(image: AssetImage('assets/four.png'),), ), ), onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => FourthCircle(),)), ), bottom: bottomSize(), right: 1.0, left: 1.0 - width/4, ), //Fifth Circle new Positioned( // alignment: AlignmentDirectional(0.35, 0.75), child: new GestureDetector( child: Container( width: width/9, height: width/9 , //child: Image.asset('assets/five.png'), decoration: BoxDecoration( shape: BoxShape.circle, image: DecorationImage(image: AssetImage('assets/five.png'),), ), ), onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => FifthCircle(),)), ), bottom: bottomSize(), right: 1.0 - width/4, left: 1.0, ), ], ), ), ), ); } rightSize(){ double width = MediaQuery.of(context).size.width; double height = MediaQuery.of(context).size.height; double rightSize; if(width > 1300){ rightSize = width/2 + 100; } else if(width >= 1280) { rightSize = width/2 - 80; } else if(width == 1024){ if(height == 552){ rightSize = width/3; } else{ //rightSize = width/2; rightSize = width/2; } } else if(width >= 960) { rightSize = width/2.8; } return rightSize; } leftSize(){ double width = MediaQuery.of(context).size.width; double height = MediaQuery.of(context).size.height; double leftSize; if(width > 1300){ leftSize = width/2 + 100; } else if(width >= 1280){ leftSize = width/2 - 80; } else if(width >= 1024){ if(height >= 552){ leftSize = width/3; } else{ leftSize = width/2; } } else if(width >= 960){ leftSize = width/2.8; } return leftSize; } bottomSize(){ double bottomSize; double width = MediaQuery.of(context).size.width; double height = MediaQuery.of(context).size.height; if(height >= 552){ bottomSize = height/7; } else{ bottomSize = height/10; } return bottomSize; } } ,我注意到以下代码突然被忽略了:

composer update

更新前的操作:

  • 隐藏页眉和页脚(在第一页上)
  • 删除顶部和底部的页边距(在第一页上)

这两个东西在更新后都刚刚停止工作。页眉和页脚显示在第一页上。 看来@page :first { margin: 0px 60px !important; display:none !important; border:none; } 部分以某种方式被忽略了。没有任何覆盖它,并且我没有更改任何其他代码。

在通过 DOMPDF 创建PDF时会发生这种情况。

我想念什么吗?

0 个答案:

没有答案